CS4231 Parallel and Distributed Algorithms: Instructor: Haifeng YU
CS4231 Parallel and Distributed Algorithms: Instructor: Haifeng YU
CS4231 Parallel and Distributed Algorithms: Instructor: Haifeng YU
Lecture 9
Instructor: Haifeng YU
Review of Last Lecture
The delay of each message is finite, but you cannot find a bound
such that all message delays are below that bound
In practice, there can be messages delayed for a long time
We can no longer define a round
If we don’t receive a message for a long time, we don’t know if the
sender has failed or the message is just delayed
{1, 2, 3} {2, 3}
{1, 2, 3} {1, 2, 3}
{2, 3} {2, 3}
{1, 2, 3} {2, 3}
Fundamental reason:
The protocol is unable to accurately detect node failure
A step of in a protocol takes the system from one global state to another:
By executing the following on process p
receive a message m (m can be null);
based on p’s local state and m, send an arbitrary but finite number of messages
based on p’s local state and m, change p’s local state to some new state
0-valent 1-valent
(0, 0, 0, 0) (1, 0, 0, 0) (1, 1, 0, 0) (1, 1, 1, 0) (1, 1, 1, 1)
There must be two adjacent initial states S0 and S1 where S0 is 0-
valent and S1 is 1-valent. (We are assuming no bivalent state.)
S0 and S1 differ by the input to a single process p.
Consider an execution starting from S0 where p fails at the very
beginning. If the decision is 1, then S0 is not 0-valent. If the decision is
0, then S1 is not 1-valent. Contradiction.
Lemma 4: Let G be a bivalent state, and e = (p,m) is any event that can be
applied to G. Let W be the set of global states that is reachable from G (G
is in W) without applying e, and V = e(W) to be the set of global states by
applying e to the states in W. Then V contains a bivalent state.
We will prove later.
Randomization
G no e 0-valent
e
G0 F
G1
e e 1-valent
G
e
e G0
e e 0-valent
1-valent
G1
e e 1-valent
G
e
e G0
e e 0-valent
1-valent 0-valent
1-valent
G1
e e 1-valent
G
e
e G0
e e 0-valent
Goal:
Termination: All non-faulty nodes eventually decide
Agreement: All non-faulty nodes should decide on the same value
Validity: If all non-faulty nodes have the same initial input, that
value should be the only possible decision value. Otherwise nodes
are allowed to decide on anything (except that they still need to
satisfy the Agreement requirement)
1 0 C:0 B:1
1 0 C:1 B:0
1 A:1
B C B C
0 A:0
input: 1 input: 0