/
Impossibility of Distributed Consensus with One Faulty Process Impossibility of Distributed Consensus with One Faulty Process

Impossibility of Distributed Consensus with One Faulty Process - PowerPoint Presentation

jade
jade . @jade
Follow
67 views
Uploaded On 2023-06-25

Impossibility of Distributed Consensus with One Faulty Process - PPT Presentation

By Michael JFischer Nancy A Lynch Michael SPaterson What is Consensus Problem Consensus is the task of getting all processes in a group to agree on some specific value based on the votes of each processes ID: 1003342

process configuration initial bivalent configuration process bivalent initial processes valent lemma message run configurations consensus event reachable decision state

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Impossibility of Distributed Consensus w..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1. Impossibility of Distributed Consensus with One Faulty ProcessBy,Michael J.FischerNancy A. LynchMichael S.Paterson

2. What is Consensus Problem?Consensus is the task of getting all processes in a group to agree on some specific value based on the votes of each processes. All processes must agree upon the same value and it must be a value that was submitted by at least one of the processes Example:Leader ElectionTransaction Commit Problem in a Distributed Database Systems

3. All data Managers must agree for the Transaction to be committed.Can I commit?Yes!!Yes!!No!!

4. Consensus Protocol In our problem we have,N processes where N ≥ 2.Each process p has input variable xp (v) : initially value in {0,1}output variable yp (d) : initially b (b=undecided).Decides 0 or 1 and its register is “Write-once” only.Faulty Process:A process is non-faulty in a run provided that it takes infinitely many steps, and it is faulty otherwiseFor a Consensus problem: Design a protocol so that eitherall non-faulty processes set their output variables to 0 all non-faulty processes set their output variables to 1There is at least one initial state that leads to each outcomes 1 and 2 above.

5. Assumptions Processing is completely asynchronous: No assumptions are made about the relative speeds of processes. Unknown delay time in message delivery. No access to synchronized clocks (no time - outs). No ability to detect the death of a process. Window Of Vulnerability: An interval of time during the execution in which the delay or inaccessibility of one process can cause the entire algorithm to wait indefinitely.

6. pGlobal Message Buffersend(p’,m)receive(p’) may return nullMessage Systemp’Supports two basic operations:Send(p,m): Places (p,m) in the message buffer where p is the name of Destination process and m its message to be sent.Receive(p):Deletes message (p,m) from buffer and returns m.

7. Terminology ...Configuration – Consists of internal state of each process, together with the contents of the message buffer.Initial configuration: A configuration in which each process starts at an initial state and the message buffer is empty.A step takes one configuration to anotherEvent: (on process p) e = (p,m) : In an atomic step, Message m delivered to p. Triggers state transition in p.Finite number of message sent by pe(C): resulting configuration on applying event e on configuration C:

8. Schedule (run): finite/infinite sequence of events that can be applied on a configuration C0.The associated sequence of steps is called a run.S = e1e2e3…ei…Reachable configuration: If a finite sequence of events take a configuration say C1 to C3, we say C3 is reachable from C1.If a configuration is reachable from the initial state C0, is said to be accessible.C0C1C2Cie1e3e2ei+1ei…Terminology ...

9. CC’C’’Event e’=(p’,m’)Event e’’=(p’’,m’’)Configuration CSchedule s=(e’,e’’)CC’’EquivalentSchedule and Event

10. Terminology ...Admissible run: a run with one faulty member at most and all messages to non-faulty members will be delivered eventually.Deciding run: some process reaches a decision states during the run i.e. a process sets its decision value (to either 0 or 1).Partially correct protocol:All accessible configuration don’t have more than one decision valueThere exists two accessible configurations G and H such that their decision values are {0} and {1} correspondingly Totally correct protocol:Partially correct.Every admissible run is a deciding run.

11. Valency Definition Let configuration C have a set of decision values V reachable from itC is called bivalent if |V| = 2C is called univalent if |V| = 1; i.e., configuration C is said to be either 0-valent or 1-valentBivalent means outcome is unpredictableA 0-valent configuration is followed by a 0-valent configurationA 1-valent configuration is followed by a 1-valent configuration

12. Lemma 1:Suppose that from some configuration C, the schedules s1,s2 lead to configuration C1,C2 respectively and if s1 and s2 are disjoint, then s2 can be applied to C1 and s1 can be applied to C2, and both lead to the same configuration C3.

13. Lemma 1(show properties about events, schedules, configurations)CC1C3Schedule s1s2C2Schedule s2s1Schedules are commutative Events are also commutative

14. Main Theorem No completely asynchronous consensus protocol is totally correct in spite of one fault.

15. Proof Sketch Messages DeliveredInitial Undecided Configuration(Bivalent)More Messages DeliveredUndecided State(Bivalent)Lemma 2:This always ExistsLemma 3:You can always get here

16. What we will showThere exists an initial configuration that is bivalent (Lemma 2)Starting from a bivalent configuration, there is always another bivalent configuration that is reachable (Lemma 3)

17. Lemma 2Some initial configuration is bivalentProof: By Contradiction Suppose all initial configurations were predetermined either 0-valent or 1-valent.Place all initial configurations side-by-side, where adjacent configurations differ in initial xp value for exactly one process.00 0 0 1 1Definition: Two initialconfigurations are adjacentif they differ in the init value xpof a single process p. There has to be some adjacent pair of 1-valent and 0-valent configurations011110

18. Lemma 2Some initial configuration is bivalent 0 0 1 1 There has to be some adjacent pair of 1-valent (C1) and 0-valent (C0) configurationsLet the process p be the one with a different state across these two configurations C0 and C1.Now consider the world where process p has crashedBoth these initial configurations are indistinguishable. But one gives a 0 decision value. The other gives a 1 decision value. So, both these initial configurations are bivalent when there is a failurep

19. What we will show There exists an initial configuration that is bivalent (Lemma 2)Starting from a bivalent configuration, there is always another bivalent configuration that is reachable

20. Lemma 3Starting from a bivalent configuration, there is always another bivalent configuration that is reachable

21. Lemma 3A bivalent initial configurationLet e=(p,m) be an applicable event to the initial configurationLet C be the set of configurations reachable without applying eCX

22. Lemma 3A bivalent initial configurationLet e=(p,m) be an applicable event to the initial configurationLet C be the set of configurations, reachable without applying eC0C1D0D1 e e e e eLet D be the set of configurationsobtained by applying single event e to a configuration in CC D X

23. Claim. Set D contains a bivalent configurationProof. By contradiction. suppose D has only 0- and 1- valent states (and no bivalent ones)There are states D0 and D1 in D, and C0 and C1 in C such that D0 is 0-valent, D1 is 1-valentD0=e(C0 ) followed by e=(p,m)D1=e(C1) followed by e=(p,m)And C0 and C1 are neighbors and hence C1 = e’(C0) followed by some event e’=(p’,m’) DCC0C1D0D1 e e e e ebivalent [don’t apply event e=(p,m)]Lemma 3’e’

24. Proof. (contd.)Case I: p’ is not pe = (p, m)e = (p, m)e’e’ = (p’, m’)From C1 follows D1 is 1-valentFrom Lemma 1 follows D1 = e’(D0), successor of 0-valent configuration is 0-valenthence contradictionD contains a bivalent configurationLemma 3p’pC0D0D1C1

25. Proof. (contd.)Case II: p’ same as pLet A be a deciding run from CoDC e e e e ebivalentC0D1D0C1ee’AE0essE1sesch. s finite deciding run from C0But A is then bivalent!Lemma 3Essse’e

26. Putting it all TogetherLemma 2: There exists an initial configuration that is bivalentLemma 3: Starting from a bivalent configuration, there is always another bivalent configuration that is reachableTheorem (Impossibility of Consensus): There is always a run of events in an asynchronous distributed system (given any algorithm) such that the group of processes never reaches consensus (i.e., always stays bivalent)

27. Theorem 2There is a partially correct consensus protocol in which all process always reach a decision, provided no process die during its execution and a strict majority of the processes are alive initially.

28. Assumptions:All processes have a unique id and initial state and know the other processes involved.No processes knows in advance which processes are initially dead.No process die while in execution of protocol.

29. Working of ProtocolStage 1:The processes construct a directed graph G with a node corresponding to each process.Each process broadcasts a message contaning its process id and listens for messages from L-1 other processes where L=(N+1)/2.G has an edge from i to j iff j receives a message from i.

30. Stage 1Each process creates a Directed graph. For ex:P1 will have an edge from P0 and P2 from P1.P1P2P0P3P3 Initially DeadP0,P1 and P2 progress to Stage 2

31. Working of ProtocolStage 2: Construct Transitive Closure of G: G+Each process broadcasts to all its initial value, process number with the names of L-1 process it heard from Stage 1.Each process then waits until it has received a Stage 2 message from every ancestor in G it initially knew about.At this point, each process knows all of its own ancestors and G that incident on them.

32. Stage 2Each process knows the edges incident on all its ancestors. Find source: node with no incoming edges.P1P2P0P3P0 is source

33. Hope You Had Fun Learning   Thank You 