Distributed algorithm in mutual exclusion takes advantage of multicast protocol to broadcast the requested message to enter the critical section. Once a node sent requested message to every node on the network, every node must send back a message stated that it allows that node to enter the critical section. The node sent requested message must receive a gaining access message from every node on the network before it can actually access to a shared resource. If one node fails to send a gaining access message, then the node cannot access the shared resource.
Because there is no centralized coordinator, it is likely that two or more node send request message simultaneously. However, logically the arrival time stamp of each request message is never been the same. We can use Lamport clock algorithm for this scenario.
Advantages and Disadvantages
- Nodes enter a critical section in time stamp order using this algorithm
- No deadlock or starvation happens
- Principle of Mutual Exclusion
- Semaphore: Mutual Exclusion in Single System
- Monitor: Mutual Exclusion in Single System
- Centralized Algorithm: Mutual Exclusion in Distributed Systems