Maekawa Algorithm: Jyothis Jagan 182IT011
Maekawa Algorithm: Jyothis Jagan 182IT011
Maekawa Algorithm: Jyothis Jagan 182IT011
Algorithm
Jyothis Jagan
182IT011
Introduction
DME Algorithms
Maekawa Algorithm
Meakawa’s
Algorithm
Requirements
Algorithm Jyothis Jagan
Comparison and
Performance 182IT011
Summary
References
April 9, 2019
Introduction
Maekawa
Algorithm
Jyothis Jagan
182IT011 Mutual Exclusion
Introduction Concurrent access of processes to a shared resource or
DME Algorithms data is executed in mutually exclusive manner.
Meakawa’s
Algorithm
Requirements
Algorithm
In a distributed system, semaphores cannot be used
Comparison and
Performance to implement mutual exclusion.
Summary
Message passing is the sole means for implementing
References
distributed mutual exclusion.
DME Algorithms
Maekawa
Algorithm
Jyothis Jagan
182IT011
Introduction
DME Algorithms
References
Meakawa’s DME Algorithm
Maekawa
Algorithm
Jyothis Jagan
182IT011
The system consists of N sites, S1 , S2 , S3 ... SN
Introduction
1 For any combination of i and j,
DME Algorithms
Meakawa’s
1 ≤ i, j ≤ N, Si ∩ Sj 6= φ
Algorithm
Requirements 2 Si , 1 ≤ i ≤ N, always contains i
Algorithm
Comparison and
Performance 3 The size of Si , | Si | , is K for any i. That is,
Summary | S1 | = | S2 | = | S3 | = ... = | Sn | = K
References
4 Any j, 1 ≤ j ≤ N, is contained in the D Si ’s,
1 ≤ i ≤ N.
Algorithm
Maekawa
Algorithm
Requesting Node
Jyothis Jagan
182IT011 1 A requesting node i sends message REQUEST(TS,i)
References
node j will:
1 if j haven’t vote for a node, then it sends YES to i
2 if j have voted, then:
1 if TSvoted candidate < TSi , then add the request to
queue. Otherwise send INQUIRE to voted
candidate.
Algorithm(cont.)
Maekawa
Algorithm
Jyothis Jagan
182IT011
Upon reception of INQUIRE message at j from i
Introduction
DME Algorithms
1 send RELINQUISH message to i if j is not in its
Meakawa’s
critical section.
Algorithm
Requirements
Algorithm Upon reception of RELINQUISH message at j from i
Comparison and
Performance
1 Send YES to the node at tope of WaitingQueuej
Summary
References
Upon reception of RELEASE message at j from i
1 Send YES to the node at tope of WaitingQueuej
Comparison and Performance
Maekawa
Algorithm
Jyothis Jagan
182IT011
Introduction
√ √
Number of messages; 3 N to 5 N
DME Algorithms
Maekawa
Algorithm
Jyothis Jagan
182IT011
Introduction
Maekawa
Algorithm
Jyothis Jagan
182IT011
Introduction