Content deleted Content added
Corrected See Also link for Nami-Trehel's Algorithm to point to existing Wikipedia page. |
|||
(41 intermediate revisions by 27 users not shown) | |||
Line 1:
{{Short description|Algorithm for mutual exclusion on a distributed system}}
{{
The '''
==Algorithm==
=== Terminology ===
* A ''site'' is any computing device which
* The ''requesting site'' is the site which is requesting
* The ''receiving site'' is every other site which is receiving
===Algorithm===
''' 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 request message, immediately
:* 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)
* Otherwise, the receiving process will defer the reply message. This means that a reply will be sent only after the receiving process has finished using the critical section itself.
''' Critical Section: '''
* Requesting site enters its critical section only after receiving all reply messages.
* Upon exiting the critical section, the site sends all deferred reply messages.
===Performance===
*
* Synchronization Delays: One message propagation delay
===Common
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===
Line 36:
==See also==
* [[Lamport's bakery algorithm
* [[Lamport's
* [[Maekawa's
* [[
* [[Raymond's
* [[Naimi–Trehel algorithm|Naimi–Trehel's algorithm]]
==References==
{{Reflist}}
*Maekawa, M., Oldehoeft, A., Oldehoeft, R.(1987). Operating Systems: Advanced Concept.Benjamin/Cummings Publishing Company, Inc.
{{DEFAULTSORT:Ricart-Agrawala Algorithm}}
[[Category:Distributed algorithms]]
|