120 likes | 223 Views
An Efficient and Fault-Tolerant Solution for Distributed Mutual Exclusion by D. Agrawal, A.E. Abbadi. Presentation by Peter Tsui for COEN 317, F/03. Goals. Fault-Tolerant - sites, links, and network partitioning Low Communication Cost Distributed Solution. Background – Other Solutions.
E N D
An Efficient and Fault-Tolerant Solution for Distributed Mutual Exclusion by D. Agrawal, A.E. Abbadi Presentation by Peter Tsui for COEN 317, F/03
Goals • Fault-Tolerant - sites, links, and network partitioning • Low Communication Cost • Distributed Solution
Background – Other Solutions • Primary Site • Distributed (Lamport) • Majority • Maekawa • Token-Based (Raymond)
2 Ideas • Coterie, C, is a set of sets or quorums. • Intersection Property – If g and h are quorums in C, then g and h has non-empty intersection. • Minimality Property – There are no two quorums g and h in C such that g is a superset of h. • Use Logical Structure – Organize sites into a logical (complete) binary tree (easy extension to n-ary tree)
Tree Quorum TQ(T) Construction • If AVAIL(T->Node) return • T->Node U TQ(T->Left-C) or • T->Node U TQ(T->Right-C) • Else return • TQ(T->Left-C) U TQ(T->Right-C) • If either of above is empty, error
Example No fail : {1,2,4}, {1,2,5}, {1,3,6}, {1,3,7} {1} fail : {2,4,3,6}, {2,4,3,7}, {2,5,3,6}, {2,5,3,7} {2 or 3} fail : {1,4,5}, {1,6,7} {1, 2} fail : {4,5,3,6}, {4,5,3,7} {1,2,3} fail : {4,5,6,7} 1 2 3 4 5 6 7 2-level complete binary tree
Correctness • The set of Tree Quorums satisfy intersection and minimality properties of coteries. • Proof by inducation of level of tree. • Induction Step: Consider binary tree of level k+1. Any tree quorum is from one of following 3 classes:- • {s1} U {members from quorum set of left subtree} • {s1} U {members from quorum set of right subtree} • {members from quorum set of left subtree} U {members from quorum set of right subtree}
Discussion • Best case tree quorum size is (ceiling function on) log n (base 2). • Worst case tree quorum size is (ceiling function on ) (n+1)/2. • If {1,2,4} fail, no tree quorum possible. • When {3,5,6,7} fail, a majority, tree quorum still possible. • When less than log n nodes fail, tree quorum always possible.
Message Cost f = fraction of tree quorum that include ROOT of tree Recurrence relation of cost of tree quorum at level (l+1) in terms of l.
Availability Availability of Tree Quorum indistinguishable with Majority Quorum when p, probability of site availability, > 0.75. Availability is only inferior when p is between [0.5, 0.75].
Some Applications • Mutual Exclusion – send request to a tree quorum, get all replies to enter CS, send relinquish when done. Use Inquire/Yield to break deadlocks. • Replication – use tree quorums for both read and write quorums. Get data with highest version number.
Conclusions • Tree Quorum provide log n messaging cost in best case and (n+1)/2 in worst case. • Tree Quorum provides fault tolerance up to about log n down sites in worst case. • Tree Quorum availability is comparable with majority alogirthm when p > 0.75.