Implement a locking scheme to protect a share file in your distributed system. While we use
processes on a single machine to emulate the distributed system and there are shared-memory
synchronization primitives available, you are required to implement one of the following
distributed locking schemes: decentralized, distributed locking or the token ring algorithm. When
a process acquires the lock, it simply opens the file, increments a counter in the file, and closes the
file. Assume that all processes keep requesting the lock until successfully acquiring the lock for a
predefined number of times.