Consensus And Agreement Algorithms Ppt

Lemma. In a consensus protocol, from each initial bivalent state S, there must be a feasible bivalent state T, so that any action taken by a process p in the state T results in either a state of 0-valenten or a state of 1-valent. Note that bivalent states should not form a cycle, as this affects the shutdown. FLP detection (continued) Actions 0 and 1 of T must be of the same process p. Conclusion • In a purely asynchronous system, there is no solution to the problem of consensus when a single process crashes. • Note that this only applies to deterministic algorithms. There are solutions to the consensus problem that use a randomized algorithm or the synchronous model. Evidence (continued) Similar arguments can also be made with respect to communication with the message-passing model (see Nancy Lynch`s book). These make that p, q cannot be different processes and p = q. Call the decision-making process.

What if p crashes into the T state? There is no consensus! Consensus in Synchronous Systems: Problem of the Byzantine Generals Describes and solves the problem of consensus on the synchronous model of communication. Processor speeds have lower limits and communication delays have upper limits. • The network is fully connected • Processes are subject to Byzantine errors, the worst possible type of failure Byzantine generals attack = 1 {1, 1, 0, 1} {1, 1, 0, 0} 0 1 The traitor can send treacherous contradictory entries {1, 1, 0} {1, 1, 0, 0} 2 3 Withdrawal = 0 Withdrawal = 0 Each general will send his judgment to all the others. These are entries in the consensus protocol. Observation • If there is no failure, it is trivial to reach a consensus. All-to-All-Broadcast followed by an application of a selection function. • However, consensus in case of failure can be complex. The complexity depends on the model of the system and the nature of the errors from the theory of asynchronous consensus. In a purely asynchronous system, the consensus problem is impossible to solve if a single process crashes. Result by Fischer, Lynch, Patterson (known as FLP 85). Received the most influential paper award from the ACM PODC in 2001 Byzantine Generals` Problem • n Generals {0, 1, 2, …, n-1} decide whether they should “attack” or “withdraw” at a certain stage of a war. The aim is to agree on the same action plan.

• Some generals may be “traitors” and, therefore, either not send entries or send contradictory messages to prevent “loyal” generals from reaching an agreement. • Develop a strategy where each loyal general eventually agrees on the same plan, regardless of the traitors` actions. A distributed consensus. An agreement is a fundamental problem in distributed computing. Some examples are Leader-Choice / Mutual Exclusion Commit or Interruption in Distributed Transactions Get agreement on the phase synchronization process failed proof Lemma. Each consensus protocol must have an initial bivalent state. Proof by contradiction. Assuming not. Then look at the following input models: n-1 2 1 0 s[0]0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 {0-valent) must be a j: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 s[d] is 0-valent 0 0 0 0 0 0 0 0 0 0 0 .

0 1 1 s[d+1] is 1-valent. . . . s[n] 1 1 1 1 1 1 . .