Jump to content

Ricart–Agrawala algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 182.19.8.82 (talk) at 09:12, 4 June 2013 (Algorithm). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 messages. It was developed by Glenn Ricart and Ashok Agrawala.

Algorithm

Terminology

  • A site is any computing device which is running ,
  • The requesting site is the site which is requesting entry into the critical section.
  • The receiving site is every other site which is receiving the request from the requesting site.

Performance

  • Number of network messages; 2*(N-1)
  • Synchronization Delays: One message propagation delay

Common Optimizations

Once site has received a message from site , site may enter the critical section multiple times without receiving permission from on subsequent attempts up to the moment when has sent a message to . 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

  • Maekawa, M.,Oldehoeft, A.,Oldehoeft, R.(1987). Operating Systems: Advanced Concept.Benjamin/Cummings Publishing Company, Inc.