Distributed Algorithm: Mutual Exclusion in Distributed Systems

06 Apr 2011 by

Distributed Algorithm in Mutex

Distributed Algorithm in Mutex

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

Advantages

  • Nodes enter a critical section in time stamp order using this algorithm
  • No deadlock or starvation happens

 

Disadvantages

  • Requires a lot of messages to be exchanged
  • If one node fails, then the node does not response to the request. It means no process can enter the critical section
  • The coordinator is the bottleneck in a centralized system. In distributed algorithm, all nodes send requests to all other nodes, then all nodes are bottlenecks

Related Articles

 

No responses yet

Leave a Reply