Fedorova Distributed Mutual Exclusion (DMTX)Similar to a local mutual exclusion problem Processes in a distributed system share a resource Only one process can access a resource at a time Examples: File sharing Sharing a bank account Updating a shared database#CMPT 401 2008 A. Fedorova Roadmap Today we will discuss protocols for coordination and agreement This is a difficult problem because of failures and lack of bound on message delay We will begin with a strong set of assumptions (assume few failures), and then we will relax those assumptions We will look at several problems requiring communication and agreement: distributed mutual exclusion, election We will finally learn that in an asynchronous distributed system it is impossible to reach a consensus#CMPT 401 2008 A. Fedorova Evaluation Criteria of DMTX Algorithms Bandwidth consumedproportional to the number of messages sent in each entry and exit operation Client delaydelay incurred by a process and each entry and exit operation System throughputthe rate at which processes can access the critical section (number of accesses per unit of time) #CMPT 401 2008 A. Fedorova Assumptions and Requirements An asynchronous system Processes do not fail Message delivery is reliable (exactly once)Protocol requirements: Safety: At most one process may execute in the critical section at a time Liveness: Requests to enter and exit the critical section eventually succeed Fairness: Requests to enter the critical section are granted in the order in which they were received#CMPT 401 2008 A. In that case, p2 will time out while waiting for coordinator message and will start a new electionelectionp1p2p3p4electionelectionelectionansweransweranswerp2#CMPT 401 2008 A. Fedorova The Bully Election Algorithm (cont.)What happens if p3 also crashes after sending the answer message but before sending the coordinator message?Use our online tools to find owner and admin contact info. Read and write reviews or vote to improve it ranking.
Fedorova The Bully Election Algorithm (cont.)Initiation of election: Process p1 detects that the existing coordinator p4 has crashed an initiates the electionp1 sends an election messages to all processes with higher identifier than itselfelectionp1p2p3p4election#CMPT 401 2008 A.
Fedorova Consensus in Asynchronous Systems With Failures The algorithms weve covered have limitations: Either tolerate only limited failures (failstop)Or assume a synchronous system Consensus is impossible to achieve in an asynchronous system Next we will see why#CMPT 401 2008 A.
Fedorova The Bully Election Algorithm (summary)The algorithm does not require a central server Does not require knowing identities of all the processes Does require knowing identities of processes with higher IDs Survives crashes Assumes a synchronous system (relies on timeouts)#CMPT 401 2008 A.
Agreement: All correct processes select the same di.
Integrity: If all correct processes propose the same v, then di = v #CMPT 401 2008 A.