Presentation is loading. Please wait.

Presentation is loading. Please wait.

Structure of Consensus 1 The Structure of Consensus Consensus touches upon the basic “topology” of distributed computations. We will use this topological.

Similar presentations


Presentation on theme: "Structure of Consensus 1 The Structure of Consensus Consensus touches upon the basic “topology” of distributed computations. We will use this topological."— Presentation transcript:

1 Structure of Consensus 1 The Structure of Consensus Consensus touches upon the basic “topology” of distributed computations. We will use this topological structure to analyze the problem in a uniform way.

2 Structure of Consensus 2 Bipotence Every execution of a protocol for consensus contains a sequence C 0,C 1,…,C k,… of configurations and a decision value. A given configuration C can appear in many executions. We say that C is 0-potent if it appears in an execution deciding 0, and similarly for 1-potent.

3 Structure of Consensus 3 A state C is bipotent if it is both 0-potent and 1-potent. Claim: For every protocol for consensus, f>0 => there is a bipotent initial state. Proof: Define C i = initial state where p 0,…,p i-1 have value 1 and the rest have value 0. C 0 is 0-potent and C n-1 is 1-potent. For some i, C i is 0-potent and C i+1 is 1-potent. Both yield the same decision when p i crashes at the outset. => one of them must be bipotent.

4 Structure of Consensus 4 The diagram shows C i ~ p C i+1 1 1 1 00 0 0 0 1 1 1 10 0 0 0 v CiCi C i+1 i

5 Structure of Consensus 5 So What? Bipotent states have undecided processes. A sequence of bipotent states precludes agreement. This approach applies in different models.

6 Structure of Consensus 6 Claim: If X is p-connected & X contains both 0-potent and 1-potent states => X contains a bipotent state. Proof: There are C ~ p C ’ in X with C being 0-potent and C’ being 1-potent. C ~ p C ’ if both are v-potent for some v. The set X is p-connected if (X, ~ p ) is connected.. Potence Connectivity

7 Structure of Consensus 7 Similarity Connectivity C ~ s C ’ if they differ at most in the state of a single process. The set X is s-connected if (X, ~ s ) is connected. Connection: X is s-connected & one crash possible => X is p-connected

8 Structure of Consensus 8 C ~ s C’ & One crash => C ~ p C’ 1 1 1 SiSi 0 0 0 0 1 1 1 Si’Si’ 0 0 0 0 v C’C’ i C

9 Structure of Consensus 9 Synchronous lower bound Claim: Fix a protocol P for f -consensus. Assume: Fewer than f -2 failures in C X C = immediate successors of C under P with at most one new failure => X C is p-connected. Proof: X C is s-connected, and any process can crash in a state of X C, so it is p-connected.

10 Structure of Consensus 10 X C is s-connected: (j,k) : j fails in this round, sends to p k,…,p n-1, doesn’t send to p 0,…,p k-1 C (j,k) (j,k+1) ~s~s (j+1,0) (j,0)...

11 Structure of Consensus 11 Remark: Potence in this proof is with respect to runs with at most one failure per round! Claim: There is always a bipotent state after f-1 rounds. Lemma: Two rounds are required for consensus from a bipotent state. Theorem: Every protocol for f-consensus requires f+1 rounds in the worst case.

12 Structure of Consensus 12 Mobile Failures Synchronous model At most one faulty process in every round Could be a different process in each round Theorem: Consensus is impossible in this case! Proof: We construct an infinite execution consisting of bipotent states, using the same rounds and reasoning as above.

13 Structure of Consensus 13 Asynchronous Message Passing Asynchronous model Crash failures, f=1 Theorem: Consensus is impossible! (This is a famous result by Fischer, Lynch and Patterson) Proof: Similar, but more delicate:

14 Structure of Consensus 14 Layers: Asynchronous “rounds” Focus on “combined steps” of the forms: (j,A) j in {0,…,n-1} “A” stands for “Absent” (j,k), j in {0,…,n-1}, k in {0,…,n} In a (j,A) step, all processes except p j move simultaneously, and then all (except p j ) receive the pending undelivered messages sent to them. In (j,k), all processes move simultaneously, and then they receive all undelivered messages sent to them, except that if p j ’s action was send(p i,m) and i < k, this message is not delivered yet.

15 Structure of Consensus 15 Properties of the layered executions Every infinite sequence of layers yields an admissible execution. It is always possible to “crash” an arbitrary process. Claim: The set of successors of a reachable configuration is p-connected. QED

16 Structure of Consensus 16 I: “full layers” are s-connected C (j,k) ~ s C (j,k+1) k = 0,…,n-1 : These states can differ at MOST in the state of the recipient of p j ’s message C (j,0) = C (j’,0) j,j’= 0,…,n-1 The same actions are taken and the same messages are delivered in both. So C (j,k) is s-connected to C (j,0) to C (j’,0) and to C (j’,k’), for all j’,k’.

17 Structure of Consensus 17 II: “all layers” are p-connected The full layers are p-connected by prev slide, since every process can always be silenced. Now: C’= C (j,n) (j,A) ~ s C (j,A) (j,0) = C’’ These states can differ at most in the state of p j. In both cases p j performs one action, based on its local state in C. Nobody hears from p j in the first round, and if p j ’s action is a send, this message is received in the second round. => C’ ~ p C’’ and so C (j,n) ~ p C (j,A)

18 Structure of Consensus 18 Asynchronous Shared Memory Asynchronous model Crash failures, f=1 Theorem: Consensus is impossible! Proof: Same proof, “full layer” step is simpler.


Download ppt "Structure of Consensus 1 The Structure of Consensus Consensus touches upon the basic “topology” of distributed computations. We will use this topological."

Similar presentations


Ads by Google