I need help to make a Local Host Lock Manger in Linux shell programming or C
You are required to design, implement and test logic for the local lock manager apart from the exceptions noted above, and as further specified in the following notes.
At the level of lock managers, locks are identified by positive integers.
The timeout imposed for the TRYLOCK message is 5 secs.
Usually lock daemons would communicate using sockets. For this assignment you may use messaging procedures which employ message queues.
Local lock manager logic must allow for arrival in any order of lock requests from local applications and replies from the master lock manager to its own messages.
A local lock manager has to service multiple local applications; so it can't block on receiving a lock granted response from the master lock manager.
A local lock manager may also receive a message from a newly elected master telling it to resubmit all information regarding locks currently in use and outstanding requests.
Observe that testing of local lock manager logic does not require setting up of multiple instances: You will however need to set up a framework which appears like the rest of the system would.