In a networked system a locking service is provided by means of daemon processes, called local lock managers, running (one per host) on each host in the system. Applications request lock operations by calling a function which sends messages to its local lock manager. The available operations are: LOCK - which doesn't return until the lock is granted TRYLOCK - which returns immediately UNLOCK The TRYLOCK operation must return a value indicating whether or not the lock was obtained. To provide consistency across the system one of the local lock managers also acts as a master daemon, recording all locks currently in use and all outstanding LOCK requests. Before granting a lock to an application each local lock manager clears the request with the master lock manager. It does this by firstly sending a TRYLOCK message to the master, and following it up if the lock isn't granted by a LOCK message. The local lock manager times the TRYLOCK message in case the master lock manager has failed. When a master lock manager fails, the first local lock manager to detect this will call an election for a new master.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) The compiler is "GCC" or "SSH" communication please make sure it's C NOT C++ 3) the final copy of the project should be similar to the example document in the zip file.
## Platform
UNIX, GCC compiler