Ricart–Agrawala algorithm

The Ricart-Agrawala Algorithm is an algorithm for mutual exclusion on a distributed system. This algorithm is an extension and optimization of Lamport's Distributed Mutual Exclusion Algorithm, by removing the need for release messages. It was developed by Glenn Ricart and Ashok Agrawala.

Algorithm

Terminology

Algorithm

Requesting Site

Receiving Site

  • the receiving process is not currently interested in the critical section OR
  • the receiving process has a lower priority (usually this means having a later timestamp)

Critical Section:

Performance

Common Optimizations

Once site P_i has received a reply message from site P_j, site P_i may enter the critical section multiple times without receiving permission from P_j on subsequent attempts up to the moment when P_i has sent a reply message to P_j. This is called Roucairol-Carvalho optimization or Roucairol-Carvalho algorithm.

Problems

One of the problems in this algorithm is failure of a node. In such a situation a process may starve forever. This problem can be solved by detecting failure of nodes after some timeout.

See also

References

This article is issued from Wikipedia - version of the Wednesday, December 02, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.