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

Slides:



Advertisements
Similar presentations
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Distributed Mutual Exclusion.
Advertisements

CS542 Topics in Distributed Systems Diganta Goswami.
Ricart and Agrawala’s Algorithm
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Mutual Exclusion By Shiran Mizrahi. Critical Section class Counter { private int value = 1; //counter starts at one public Counter(int c) { //constructor.
Chapter 6 Process Synchronization Bernard Chen Spring 2007.
Multiprocessor Synchronization Algorithms ( ) Lecturer: Danny Hendler The Mutual Exclusion problem.
CH7 discussion-review Mahmoud Alhabbash. Q1 What is a Race Condition? How could we prevent that? – Race condition is the situation where several processes.
China’s Software Industry August 2006 Instructor: Hengming Zou, Ph.D.
Critical Section chapter3.
Chapter 3 The Critical Section Problem
Peer-to-Peer Distributed Search. Peer-to-Peer Networks A pure peer-to-peer network is a collection of nodes or peers that: 1.Are autonomous: participants.
Expected Quorum Overlap Sizes of Optimal Quorum Systems with the Rotation Closure Property for Asynchronous Power-Saving Algorithms in Mobile Ad Hoc Networks.
1 Complexity of Network Synchronization Raeda Naamnieh.
Distributed Systems Spring 2009
The Critical-Section Problem
CS 582 / CMPE 481 Distributed Systems
Ordering and Consistent Cuts Presented By Biswanath Panda.
Highly Concurrent and Fault-Tolerant h-out of-k Mutual Exclusion Using Cohorts Coteries for Distributed Systems.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
Concurrent Processes Lecture 5. Introduction Modern operating systems can handle more than one process at a time System scheduler manages processes and.
20101 Synchronization in distributed systems A collection of independent computers that appears to its users as a single coherent system.
A Fault-Tolerant h-out of-k Mutual Exclusion Algorithm Using Cohorts Coteries for Distributed Systems Presented by Jehn-Ruey Jiang National Central University.
A Fault-Tolerant h-out of-k Mutual Exclusion Algorithm Using Cohorts Coteries for Distributed Systems Presented by Jehn-Ruey Jiang National Central University.
1 Prioritized h-out of-k Resource Allocation for Mobile Ad Hoc Networks and Distributed Systems Jehn-Ruey Jiang Hsuan Chuang University HsinChu, Taiwan.
An Energy Efficient Leaser Election Algorithm for Mobile Ad Hoc Networks Paolo Cemim, Vinicius De Antoni Instituto de Informatica Universidade Federal.
Distributed Mutual Exclusion Béat Hirsbrunner References G. Coulouris, J. Dollimore and T. Kindberg "Distributed Systems: Concepts and Design", Ed. 4,
1 Lecture 20: Protocols and Synchronization Topics: distributed shared-memory multiprocessors, synchronization (Sections )
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Election Algorithms and Distributed Processing Section 6.5.
1 Thread Synchronization: Too Much Milk. 2 Implementing Critical Sections in Software Hard The following example will demonstrate the difficulty of providing.
The Critical Section Problem
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
Concurrency, Mutual Exclusion and Synchronization.
MUTUAL EXCLUSION AND QUORUMS CS Distributed Mutual Exclusion Given a set of processes and a single resource, develop a protocol to ensure exclusive.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Coordination and Agreement. Topics Distributed Mutual Exclusion Leader Election.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
1 Chapter 10 Distributed Algorithms. 2 Chapter Content This and the next two chapters present algorithms designed for loosely-connected distributed systems.
Vector Clock Each process maintains an array of clocks –vc.j.k denotes the knowledge that j has about the clock of k –vc.j.j, thus, denotes the clock of.
Mutual Exclusion Using Atomic Registers Lecturer: Netanel Dahan Instructor: Prof. Yehuda Afek B.Sc. Seminar on Distributed Computation Tel-Aviv University.
Event Ordering Greg Bilodeau CS 5204 November 3, 2009.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
Lecture 10 – Mutual Exclusion Distributed Systems.
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.
1 Lecture 19: Scalable Protocols & Synch Topics: coherence protocols for distributed shared-memory multiprocessors and synchronization (Sections )
Lecture 10: Coordination and Agreement (Chap 12) Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
A Torus Quorum Protocol for Distributed Mutual Exclusion A Torus Quorum Protocol for Distributed Mutual Exclusion S.D. Lang and L.J. Mao School of Computer.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Distributed Mutual Exclusion Synchronization in Distributed Systems Synchronization in distributed systems are often more difficult compared to synchronization.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Revisiting Logical Clocks: Mutual Exclusion Problem statement: Given a set of n processes, and a shared resource, it is required that: –Mutual exclusion.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Oct 1, 2015 Lecture 12: Mutual Exclusion All slides © IG.
Chapter 8 Fault Tolerance. Outline Introductions –Concepts –Failure models –Redundancy Process resilience –Groups and failure masking –Distributed agreement.
Coordination and Agreement
Lecture 18: Coherence and Synchronization
Outline Distributed Mutual Exclusion Distributed Deadlock Detection
Comparison between Suzuki Kasami’s and Raymond’s Tree Algorithm
Distributed Mutual Exclusion
The Critical-Section Problem
Outline Distributed Mutual Exclusion Introduction Performance measures
Concurrency: Mutual Exclusion and Process Synchronization
Lecture 24: Multiprocessors
Lecture 19: Coherence and Synchronization
Lecture 18: Coherence and Synchronization
Distributed Mutual eXclusion
CSE 486/586 Distributed Systems Mutual Exclusion
Presentation transcript:

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

Outline  Introduction  Related Work  k-Write-Read Coteries  The Proposed Algorithm  Analysis  Conclusion

Outline  Introduction  Related Work  k-Write-Read Coteries  The Proposed Algorithm  Analysis  Conclusion

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

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.

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

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

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.

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

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

Group Mutual 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.

Group Mutual Exclusion Example   in CS for resource  group a group b group c group d        

Group Mutual Exclusion Example in CS for resource  group a group b group c group d          

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.

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

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

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

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.

Outline  Introduction  Related Work  k-Write-Read Coteries  The Proposed Algorithm  Analysis  Conclusion

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)

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

Outline  Introduction  Related Work  k-Write-Read Coteries  The Proposed Algorithm  Correctness  Analysis  Conclusion

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

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.

Torus Structure  An array of nodes of r rows and c columns.  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 c columns

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  One node for every row  The write quorum and the read quorum intersects in node 4 a write quorum a read quorum

Outline  Introduction  Related Work  k-Write-Read Coteries  The Proposed Algorithm  Analysis  Conclusion

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

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.

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 follower if 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.

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.

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.

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.

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.

Outline  Introduction  Related Work  k-Write-Read Coteries  The Proposed Algorithm  Analysis  Conclusion

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.

Outline  Introduction  Related Work  k-Write-Read Coteries  The Proposed Algorithm  Analysis  Conclusion

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 torus structures 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.

Thanks!!