Content deleted Content added
Fresheneesz (talk | contribs) mNo edit summary |
Corrected See Also link for Nami-Trehel's Algorithm to point to existing Wikipedia page. |
||
(53 intermediate revisions by 36 users not shown) | |||
Line 1:
{{Short description|Algorithm for mutual exclusion on a distributed system}}
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 <math>release</math> messages. It was developed by [[Glenn Ricart]] and [[Ashok Agrawala]].▼
{{more citations needed|date=December 2009}}
▲The '''
▲== Algorithm ==
=== Terminology ===
* A ''site'' is any computing device which
*
===
''' Requesting Site
* Sends a message to all sites. This message includes the site's name, and the current timestamp of the system according to its [[logical clock]] (''which is assumed to be synchronized with the other sites'')
''' Receiving Site
* Upon reception of a
:*
:* the receiving process has a lower priority (''usually this means having a later timestamp)
* Otherwise,
''' Critical Section: '''
*
* Upon exiting the critical section,
===
*
* Synchronization Delays: One message propagation delay
===
Once site <math>P_i</math> has received a <math>reply</math> message from site <math>P_j</math>, site <math>P_i</math> may enter the critical section multiple times without receiving permission from <math>P_j</math>
▲=== 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.
==
* [[Lamport's bakery algorithm
* [[Lamport's
* [[Maekawa's
* [[
* [[Raymond's
* [[Naimi–Trehel algorithm|Naimi–Trehel's algorithm]]
==References==
[[Category:Distributed algorithms]]▼
{{Reflist}}
*Maekawa, M., Oldehoeft, A., Oldehoeft, R.(1987). Operating Systems: Advanced Concept.Benjamin/Cummings Publishing Company, Inc.
▲[[Category:Distributed algorithms]]
|