Maekawa’s algorithm
Posted on November 30th, 2007 by admin
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.
Algorithm
Terminology
- A site is any computing device which is running the Maekawa’s Algorithm
- For any one request of the critical section:
- 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.
- ts refers to the local timestamp of the system according to its logical clock.
Algorithm
Requesting Site:
- A requesting site <math>P_i</math> sends a message <math>request(ts, i)</math> to all sites in its quorum set <math>R_i</math>.
Receiving Site:
- Upon reception of a <math>request(ts, i)</math> message, the receiving site <math>P_j</math> will:
- If site <math>P_j</math> does not have an outstanding <math>grant</math> message (that is, a <math>grant</math> message that has not been released), then site <math>P_j</math> sends a <math>grant(j)</math> message to site <math>P_i</math>.
- If site <math>P_j</math> has an outstanding <math>grant</math> message with a process with higher priority than the request, then site <math>P_j</math> sends a <math>failed(j)</math> message to site <math>P_i</math> and site <math>P_j</math> queues the request from site <math>P_i</math>.
- If site <math>P_j</math> has an outstanding <math>grant</math> message with a process with lower priority than the request, then site <math>P_j</math> sends an <math>inquire(j)</math> message to the process which has currently been granted access to the critical section by site <math>P_j</math>. (That is, the site with the outstanding <math>grant</math> message.)
- Upon reception of a <math>inquire(j)</math> message, the site <math>P_k</math> will:
- Send a <math>yield(k)</math> message to site <math>P_j</math> if and only if site <math>P_k</math> has received a <math>failed</math> message from some other site or if <math>P_k</math> has sent a yield to some other site but have not received a new <math>grant</math>.
- Upon reception of a <math>yield(k)</math> message, site <math>P_j</math> will:
- Send a <math>grant(j)</math> message to the request on the top of its own request queue.
- Place <math>P_k</math> into its request queue.
- Upon reception of a <math>release(i)</math> message, site <math>P_j</math> will:
- Delete <math>P_i</math> from its request queue.
- Send a <math>grant(j)</math> message to the request on the top of its request queue.
Critical Section:
- Site <math>P_i</math> enters the critical section on receiving a <math>grant</math> message from all sites in <math>R_i</math>.
- Upon exiting the critical section, <math>P_i</math> sends a <math>release(i)</math> message to all sites in <math>R_i</math>.
Quorum Set (<math>R_x</math>):
A quorum set must abide by the following properties:
- <math>\forall i \forall j [R_i \bigcap R_j \ne \empty ]</math>
- <math>\forall i [ P_i \in R_i ]</math>
- <math>\forall i [ |R_i| = K ]</math>
- Site <math>P_i</math> is contained in exactly <math>K</math> request sets
- Therefore:
- <math>|R_i| \geq \sqrt{N-1}</math>
Performance
- Number of network messages; <math>3 \sqrt{N}</math> to <math>6 \sqrt{N}</math>
- Synchronization delay: 2 message propagation delays
See also
- Lamport’s bakery algorithm
- Lamport’s distributed mutual exclusion algorithm
- Ricart-Agrawala algorithm
- Suzuki-Kasami’s algorithm
- Raymond’s algorithm
External links
- “A sqrt(N) algorithm for mutual exclusion in decentralized systems” at The ACM Digital Library
- Wordlock - 4-Dial Luggage Lock - Spell Your Combination! - Edwards 4-Dial Luggage Lock - Spell Your Combination!, Wordlock is a new and innovative twist on the luggage lock. Simply set it to a word that's easy to remember
- The TSA Approved SearchAlert Luggage Lock Of course, no luggage thief in a busy airport is going to want to spend five minutes trying to open a combination lock when the next bag on the conveyor
- Luggage lock - Patent 5713226 A luggage lock is composed of a lock body, a retainer engageable and disengageable with the lock body, and a retaining strap fastened at one end thereof
- Travel Locks - Shop for travel luggage lock Traveling through busy airports today means you need the right luggage, luggage tags, and luggage locks and travel locks. Our selection of luggage locks
- Safety & Security Travel Gear Samsonite Disposable Luggage Locks A quick, cost-effective way to secure zippers when use of The Samsonite Touch Lock is a great luggage lock. More
- Amazon.co.uk: Henry Squire Lp6t Luggage Locks (Card 2): DIY & Tools Amazon.co.uk: Henry Squire Lp6t Luggage Locks (Card 2): DIY & Tools.
- Safe Skies Heavy Duty Luggage Lock by TravelPro at HSN.com Shop at home for Safe Skies Heavy Duty Luggage Lock by TravelPro or more Luggage from the Home Shopping Network.
- TSA24 4 Dial Combination Luggage Lock - 13801070017 4 Dial Combination Luggage Lock that is accepted by the Travel Security Administration (TSA) for use on checked baggage. Can be opened with your pre-set
- Travel Security - Locks TSA24 4 Dial Combination Luggage Lock. TSA24 4 Dial Combination Luggage Lock. $10.95. TSA228 Lockable Luggage Strap · TSA228 Lockable Luggage Strap
- Travel Babel: Luggage Lock Uses Words, Not Numbers I should remember my PIN codes and combinations for luggage locks, bike locks and miscellaneous padlocks, to say nothing of numerous phone numbers,
- NewsChannel6 - LUGGAGE LOCKS But she does have new locks. Vermilye gave us new ones for her, along with a TSA-recognized locking luggage strap for her next trip.
- Luggage Tags, Luggage ID Tags, Luggage Locks & Luggage Straps Adventure travel store with a full line of travel accessories,luggage, clothing,maps,guidebooks,Eagle Creek,travel information,Lonely Planet,baggage.
- Use TSA-approved luggage locks for checked baggage, or else Question: Returning to Burbank from a trip to Have a travel dilemma? Write to travel@latimes.com.

Discussion Area - Leave a Comment
You must be logged in to post a comment.