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

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

View Full Document Right Arrow Icon
1 A Sqrt(N) Algorithm for Mutual Exclusion in Decentralized Systems Mamoru Maekawa University of Tokyo
Background image of page 1

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

View Full DocumentRight Arrow Icon
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)
Background image of page 2
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)
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
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.
Background image of page 5

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

View Full DocumentRight Arrow Icon
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.
Background image of page 6
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).
Background image of page 7

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

View Full DocumentRight Arrow Icon
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 = + =
Background image of page 8
9 Finding Si’s
Background image of page 9

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

View Full DocumentRight Arrow Icon
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
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/15/2011 for the course ECKOW 123 taught by Professor Riuyt during the Spring '11 term at University of Damascus.

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 Right Arrow Icon
Ask a homework question - tutors are online