Outline • Agreement Protocols • Quiz – Introduction

advertisement
Outline
• Agreement Protocols
– Introduction
– Lamport-Shostak-Pease algorithm
– Applications of agreement protocols
• Quiz
5/29/2016
COP5611
1
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
5/29/2016
COP5611
2
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
5/29/2016
COP5611
3
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
5/29/2016
COP5611
4
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
5/29/2016
COP5611
5
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
– In an asynchronous computation, processes do
not proceed in lock steps
– Synchronous model is used for agreement
protocol
5/29/2016
COP5611
6
The System Model – cont.
• Processor Failures
– Crash fault
– Omission fault
– Malicious fault
• Authenticated vs. non-authenticated messages
5/29/2016
COP5611
7
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
5/29/2016
COP5611
8
Agreement Problems
• There are three well known agreement problems
– Byzantine agreement problem
– Consensus problem
– Interactive consistency problem
5/29/2016
COP5611
9
Byzantine Agreement Problem
• A chosen process, called source process,
broadcasts its initial value to all other
processes
• A solution should
5/29/2016
COP5611
10
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
5/29/2016
COP5611
11
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
5/29/2016
COP5611
12
Byzantine Agreement Problem – cont.
• The Upper Bound on the Number of Faulty Processors
– In a fully connected network, it is impossible to
reach consensus if the number of faulty processors
exceeds (n-1)/3
5/29/2016
COP5611
13
Lamport-Shostak-Pease Algorithm
5/29/2016
COP5611
14
Lamport-Shostak-Pease Algorithm – cont.
5/29/2016
COP5611
15
Lamport-Shostak-Pease Algorithm – cont.
5/29/2016
COP5611
16
Lamport-Shostak-Pease Algorithm – cont.
• Performance analysis
– Time
– Message traffic
– Storage overhead
5/29/2016
COP5611
17
Fault-Tolerant Clock Synchronization
• The interactive convergence algorithm
5/29/2016
COP5611
18
Atomic Commit in DDBS
• In atomic commit, sites of DDBS must agree
whether to commit or abort a transaction
– One site makes a local decision first and then it
starts the Byzantine agreement
– The sites determine a common decision based on
the agreed value
5/29/2016
COP5611
19
Download