{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

slides_030607

# slides_030607 - A Sqrt(N Algorithm for Mutual Exclusion in...

This preview shows pages 1–11. Sign up to view the full content.

1 A Sqrt(N) Algorithm for Mutual Exclusion in Decentralized Systems Mamoru Maekawa University of Tokyo

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Distributed Mutual Exclusion The mutual exclusion problem involves the allocation of a single, indivisible, non shareable resource among n nodes. In a distributed system, mutual exclusion is based solely on message passing. Requirements Safety: At most one node can access the critical section at a time. Liveness: Requests to enter and leave the critical section eventually succeed.( No starvation and deadlock)
3 Previous Work Ricart and Agrawala: Each node requesting mutual exclusion seeks permission from all other nodes. Complexity: O(N), 2(N- 1) messages are required. Thomas (Quorum based): Each node requesting mutual exclusion seeks permission from only a majority of nodes. Complexity: same as above , best case: N messages are required Gifford and Skeen (weighted approach): nodes can cast more than one vote. Majority of the votes is the criteria for mutual exclusion Centralized approach (not a distributed algorithm)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Maekawa Algorithm Uses only c*sqrt(N) messages to create mutual exclusion. Optimal distributed algorithm Assumptions: Error free FIFO Channels : messages between two nodes are delivered in the order sent
5 Optimal Algorithm Goal : To reduce the number of request messages. Conditions Distributed. Request Resolution Request Resolution: Any pair of requests from different nodes must reach a common node.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Formulation of conditions Request resolution rule: S i is the set of nodes from which, node i should obtain permission to enter critical section. This non null intersection property is a necessary condition for the S i ’s so that mutual exclusion requests can be resolved Reduction Rule: This rule reduces the number of messages to be sent and received by a node.
7 Contd… Distributed Rule: Each node needs to send and receive the same number of messages to obtain mutual exclusion (Equal work). Each node serves as an arbitrator for the same number of nodes. This ensures that each node is equally responsible for mutual exclusion (Equal responsibility).

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Optimal K The general idea is to represent the maximum number of S i ’s in terms of D, K guided by the established set of rules. This evaluates to: (D-1)K + 1 This should be equal to the number of nodes, N, so that K is minimized for a given N. D is the degree of duplication of nodes and KN is the number of members such that N = KN/D. Thus D=K. ) ( K 1 1) - K(K N N O K N = + =
9 Finding Si’s

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10 Algorithm Outline If node i can lock all members of S i , then no other node can capture all its members since the intersection of its Voting Set with that of i’s will have at least one node. If a node fails to capture all its members, it waits till all of
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 49

slides_030607 - A Sqrt(N Algorithm for Mutual Exclusion in...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online