Outline Distributed Mutual Exclusion Distributed Deadlock Detection Token-based algorithms Distributed Deadlock Detection Review and overview Agreement Protocols Introduction Lamport-Shostak-Pease algorithm Dolev et al’s algorithm Applications of agreement protocols 11/15/2018 COP5611
Announcements There will be a quiz next Tuesday It will be an open book quiz It covers the things we have covered so far It will be at the end of the class You can turn in your homework #2 next Tuesday However, no submission after that date will be accepted Please do not run your programs on diablo 11/15/2018 COP5611
Distributed Deadlock Detection In distributed systems, the system state can be represented by a wait-for graph (WFG) In WFG, nodes are processes and there is a directed edge from node P1 to node P2 if P1 is blocked and is waiting for P2 to release some resource The system is deadlocked if there is a directed cycle or knot in its WFG The problem is how to maintain the WFG and detect cycle/knot in the graph 11/15/2018 COP5611
Distributed Deadlock Detection – cont. Centralized detection algorithms Distributed deadlock algorithms Path-pushing Edge-chasing Diffusion computation Global state detection You need to know the basic ideas but not the details about those algorithms 11/15/2018 COP5611
Agreement Protocols In distributed systems, sites are often required to reach mutual agreement In distributed database systems, data managers must agree on whether to commit or to abort a transaction Reaching an agreement requires the sites have knowledge about values at other sites Agreement when the system is free from failures Agreement when the system is prone to failure 11/15/2018 COP5611
The System Model There are n sites in the distributed system and at most m can be faulty Each site can communicate with all other sites through message passing A receiver always knows the identity of the sender of a message The communication is reliable 11/15/2018 COP5611
The System Model – cont. Synchronous vs. asynchronous computations In a synchronous computation, processes in the distributed system run in lock step manner In each step, a process receives messages from other sites sent in the previous step, performs a computation, and sends messages to other processes 11/15/2018 COP5611
The System Model – cont. Processor Failures Crash fault Omission fault Malicious fault Authenticated vs. non-authenticated messages 11/15/2018 COP5611
The System Model – cont. Performance Analysis Time to reach an agreement under a given protocol Message traffic measured by the number of messages exchanged to reach an agreement Storage overhead 11/15/2018 COP5611
Agreement Problems There are three well known agreement problems Byzantine agreement problem Consensus problem Interactive consistency problem 11/15/2018 COP5611
Byzantine Agreement Problem A chosen process, called source process, broadcasts its initial value to all other processes A solution should 11/15/2018 COP5611
The Consensus Problem In this problem, every process broadcasts its initial value to all other processes, where the initial values of different processes can be different 11/15/2018 COP5611
The Interactive Consistency Problem In this problem, every process broadcasts its initial value to all other processes, where the initial values of different processes can be different 11/15/2018 COP5611
Lamport-Shostak-Pease Algorithm 11/15/2018 COP5611
Lamport-Shostak-Pease Algorithm – cont. 11/15/2018 COP5611
Lamport-Shostak-Pease Algorithm – cont. Performance analysis Time Message traffic Storage overhead 11/15/2018 COP5611
Fault-Tolerant Clock Synchronization The interactive convergence algorithm 11/15/2018 COP5611
Fault-Tolerant Clock Synchronization – cont. The interactive consistency algorithm 11/15/2018 COP5611