Download
a distributed group k exclusion algorithm using k write read coteries n.
Skip this Video
Loading SlideShow in 5 Seconds..
A Distributed Group k -Exclusion Algorithm Using k -Write-Read Coteries PowerPoint Presentation
Download Presentation
A Distributed Group k -Exclusion Algorithm Using k -Write-Read Coteries

A Distributed Group k -Exclusion Algorithm Using k -Write-Read Coteries

151 Vues Download Presentation
Télécharger la présentation

A Distributed Group k -Exclusion Algorithm Using k -Write-Read Coteries

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. A Distributed Group k-Exclusion Algorithm Using k-Write-Read Coteries Presented by Jehn-Ruey Jiang National Central University Taiwan, R. O. C.

  2. Outline • Introduction • Related Work • k-Write-Read Coteries • The Proposed Algorithm • Analysis • Conclusion

  3. Outline • Introduction • Related Work • k-Write-Read Coteries • The Proposed Algorithm • Analysis • Conclusion

  4. Distributed Systems • A distributed system consists of interconnected, autonomous nodes which communicate with each other by passing messages. node c Interconnected Network node a node d node b node e

  5. Mutual Exclusion • A node in the system may need to enter the critical section (CS) occasionally to access a shared resource, such as a shared file or a shared table, etc. • How to control the nodes so that the shared resource is accessed by at most one node at a time is called the mutual exclusion problem.

  6. Mutual Exclusion Example in CS node c node a node d node b node e

  7. Mutual Exclusion Example node c node a in CS node d node b node e

  8. k-Exclusion • If there are k, k1, identical copies of shared resources, such as a k-user software license, then there can be at most k nodes accessing the resources at a time. • This raises the k-exclusion problem.

  9. k-Exclusion Example k=2 in CS node c node a in CS node d node b node e

  10. k-Exclusion Example k=2 in CS node c node a node d node b in CS node e

  11. GroupMutual Exclusion • A group of nodes requesting to access the same resource may do so concurrently. However, if two nodes request to access different resources, only one node can proceed.

  12. GroupMutual Exclusion Example in CS for resource  group c group a      group b group d

  13. GroupMutual Exclusion Example group c group a   in CS for resource     group b group d

  14. E.G.: One Seminar Room for Many Groups • There is only one seminar room and there are several groups contending for the seminar room to each initiate a forum of some topic. • Only one forum can proceed at a time. • You are welcome to join a forum if you are interested in the topic of that forum.

  15. Group k-Exclusion • It is an extension of both the k-exclusion problem and the group mutual exclusion problem. • It restricts that there are at most k different groups of nodes accessing k different resources concurrently

  16. Group k-Exclusion Example in CS for resource  The group is dynamic. A node can join a group at any time. group c in CS for resource  group a      k=2 group b group d

  17. Group k-Exclusion Example in CS for resource  group c group a   in CS for resource     k=2 group b group d

  18. E.G.: k Seminar Rooms for Many Groups • There are k seminar rooms and there are several groups contending for the seminar rooms to each initiate a forum of some topic. • k forums can proceed concurrently. • You are welcome to join a forum at any time if you are interested in the topic of that forum.

  19. Outline • Introduction • Related Work • k-Write-Read Coteries • The Proposed Algorithm • Analysis • Conclusion

  20. Related Work • To the best of our knowledge, there exists no quorum-based group k-exclusion algorithm for distributed systems. • The existent group k-exclusion algorithms are designed for the shared memory model. (by Vidyasankar in 2002 and 2003)

  21. Related Work • Four quorum-based group mutual exclusion algorithms: • Three by Joung in 2001 using m-group quorum system • Drawback: limited number of shared resources • One by Toyomura et al. in 2003 using coterie • Drawback: High context switch complexity

  22. Outline • Introduction • Related Work • k-Write-Read Coteries • The Proposed Algorithm • Correctness • Analysis • Conclusion

  23. k-Write-Read Coteries • A k-wr coterie is a pair (W, R), where W and R are collections of sets (called quorums) satisfying: • Write k-Intersection Property • Write Non-intersection Property • Write-Read Intersection Property • Write Quorum Minimality Property • Read Quorum Minimality Property • By properties 1, 2 and 4, W is a k-coterie.

  24. Example of k-Write-Read Coteries • W={{1, 2, 3}, {1, 2, 4}, {5, 6, 7}, {5, 6, 8}, {1, 7, 8}, {2, 7, 8}, {3, 4, 5}, {3, 4, 6} } • R={{1, 3, 5, 7}, {1, 3, 5, 8}, {1, 3, 6, 7}, {1, 3, 6, 8}, {1, 4, 5, 7}, {1, 4, 5, 8}, {1, 4, 6, 7}, {1, 4, 6, 8}, {2, 3, 5, 7}, {2, 3, 5, 8}, {2, 3, 6, 7}, {2, 3, 6, 8}, {2, 4, 5, 7}, {2, 4, 5, 8}, {2, 4, 6, 7}, {2, 4, 6, 8}}. • We can check that (W, R) is a 2-wr coterie because every quorum is minimal, W is a 2‑coterie, and any quorum Q in W intersects any quorum P in R.

  25. Torus Structure • An array of nodes of rrows and ccolumns. • The rows are arranged in a wraparound manner; i.e., a row i is followed by row i+1 for 1i<r and row r is followed by row 1. r rows ccolumns

  26. Construct k-wr coteries by torus structures • All nodes of some row j • Plus one node from each of the floor(r / (k + 1)) rows following row j a write quorum • The write quorum and the read quorum intersects in node 4 • One node for every row a read quorum

  27. Outline • Introduction • Related Work • k-Write-Read Coteries • The Proposed Algorithm • Analysis • Conclusion

  28. The Cycle of a Node loop forever NCS (non-critical section) ES (entry section) WS (wait section) CS (critical section) XS (exit section)endloop

  29. Basic Idea • A node should send request messages to collect enough grants from members of a write quorum to enter CS for accessing a shared resource. • To increase the concurrency, a node is allowed to enter CS immediately if a reference node in CS grants it to do so.

  30. Reference node v.s. Follower • A node is said to be a reference node if it has got grants from all members of some write quorum. • A node is a followerif it enters CS with a grant from a reference node. • Once a node becomes a follower, it sends release message to all the nodes that it has sent request messages.

  31. Reference node Registration • A reference node r registers its ID for every node of a read quorum so that other nodes of the same group can check r’s existence when collecting grants from members of a write quorum. • This mechanism works because a read quorum intersects any write quorum.

  32. Leader • There may be several reference nodes for some type of resource; one of the reference nodes is chosen as the leader. • After obtaining grants from all members of a write quorum Q, a node u selects an arbitrary read quorum P and sends COMPETE(t, u, x, QP) message to nodes in QP to compete as the leader of the group of nodes requesting resource x. • The sending of COMPETE message is with the small-ID to large-ID order. It is also the registration procedure for a reference node.

  33. Leaving CS • The leader is responsible of initiating and closing the entry of CS for a group of nodes. • To close the entry of CS, the leader should clear its registration of being the leader. • And after all followers have left CS, the leader should send release messages to all the nodes that it has sent request messages to leave CS; every other node just sends a release message to its reference node to leave CS.

  34. Properties • k-Exclusion: At most k groups of nodes are allowed to enter CS concurrently. • k-Progressing: If there are less than k groups of nodes in CS at a time, then one more group of nodes are allowed to enter CS concurrently. • Concurrent Entering: Nodes of a group are allowed to enter CS concurrently if at lease one node of the group is in CS. • Bounded Delay: If a node enters ES (entry section), then it eventually enter CS.

  35. Outline • Introduction • Related Work • k-Write-Read Coteries • The Proposed Algorithm • Analysis • Conclusion

  36. Analysis • The proposed algorithm has message complexity of 2Q+4 to 6n+2QP+1 • The proposed algorithm has synchronization delay of 3 to QP+3, where Q is a write quorum, and P, a read quorum of a k-write-read coterie. The synchronization delay is the delay from the time a node starts requesting to enter CS to the time the node enters CS. It is usually measured by the number of message transmission time.

  37. Outline • Introduction • Related Work • k-Write-Read Coteries • The Proposed Algorithm • Analysis • Conclusion

  38. Conclusion • We have proposed a novel quorum system, k-write-read coterie, to solve the group k-exclusion problem for distributed systems. • We have also shown how to construct k-write-read coteries with the help of torusstructures and have proposed a distributed group k-exclusion algorithm using k-write-read coteries. • The proposed algorithm utilizes the concept of reference node to reduce the context switch complexity. • The proposed algorithm has the merits of unbounded degree of concurrency and unlimited number of types of resources.

  39. Thanks!!