Ricart-Agrawala algorithm

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

* A "site" is any computing device which is running the Ricart-Agrawala Algorithm
* 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.

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 send a timestamped reply message if and only if::* 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

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

Common Optimizations

Once site P_i has received a reply message from site P_j, site P_i may enter the critical section without receiving permission from P_j until P_i has sent a reply message to P_j

This optimization is called Roucairol & Carvalho Optimization

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

* Lamport's Bakery Algorithm
* Lamport's Distributed Mutual Exclusion Algorithm
* Maekawa's Algorithm
* Suzuki-Kasami's Algorithm
* Raymond's Algorithm
*Naimi-Trehel's Algorithm


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Ricart-Agrawala-Algorithmus — Der Ricart Agrawala Algorithmus kommt in einem verteilten System zur Anwendung um den Zugang zu einem kritischen Abschnitt zu regeln und dabei wechselseitigen Ausschluss zu garantieren. Dabei basiert der Algorithmus auf dem Nachrichtenaustausch… …   Deutsch Wikipedia

  • Glenn Ricart — Occupation Computer scientist Known for ARPANET pioneer, OSPF Dr. Glenn Ricart is a computer scientist.[1] He started using one of the original Internet (ARPANET) nodes in 1969. He set up what was probably the first Internet Exc …   Wikipedia

  • Maekawa's algorithm — is an algorithm for mutual exclusion on a distributed system. The basis of this algorithm is a quorum like approach where any one site needs only to seek permissions from a subset of other sites. Contents 1 Algorithm 1.1 Terminology 1.2 Algorithm …   Wikipedia

  • Raymond's algorithm — is a token based algorithm for mutual exclusion on a distributed system. It imposes a logical structure (a K ary tree) on distributed resources. As defined, each node has only a single parent, to which all requests to attain the token are made.… …   Wikipedia

  • Lamport's Distributed Mutual Exclusion Algorithm — is a contention based algorithm for mutual exclusion on a distributed system. Algorithm Nodal Properties# Every process maintains a queue of pending requests for entering critical section ordered according to the logical time… …   Wikipedia

  • Maekawa-Algorithmus — Der von Mamoru Maekawa 1985 vorgestellte Maekawa Algorithmus kommt in einem verteilten System zur Anwendung, um den Zugang zu einem kritischen Abschnitt zu regeln und dabei wechselseitigen Ausschluss zu garantieren. Die Grundidee dieses… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”