Docsity

Failure Models and Consensus Algorithms in Distributed Systems - Prof. Sayan Mitra, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Failure Models and Consensus Algorithms in Distributed Systems - Prof. Sayan Mitra and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Lecture 8

consensus 1:

distributed systems

CS425 / ECE 428 / CSE 424

sayan mitra

failure models

  • crash failure: ceases to execute
    • permanent
    • dead for finite period of time then resumes
    • cause: e.g. power loss
  • omission failure: sender sends a sequence of messages

but receiver does not receive some subset of messages

  • cause: e.g. interference in medium
  • transient failure: process jumps to arbitrary state and

resumes normal execution

  • cause: e.g. gamma rays
  • Byzantine failure: arbitrary messages and transitions
  • cause: e.g. software bugs, malicious attacks

byzantine generals (BG)

  • n>2 generals ,0,1,2,…,n-1}
  • one of the generals is the commander who issues attack

or retreat commands to all the other generals

  • all generals try to agree about whether to attack or retreat
  • some generals (including the commander) may be

traitors (byzantine)

• requirements

  • termination: all correct generals decide
  • agreement: if pi and pj are correct then di = dj
  • integrity: if commander is correct then all correct processes decide value issued by commander
  • if commander is correct then integrity implies agreement

interactive consistency (IC)

• n processes ,0,1,2,…,n-1} try to agree on vector

of values

• pi begins in undecided state and proposes a

value vi  D

• pi sets its decision value di and enters decided

state

• consensus requirements

  • termination: all correct processes decide
  • agreement: the decision vector for all correct

processes is the same

  • integrity: if pi is correct then for any correct process

pj, dj[i] = vi

solving consensus with reliable

totally ordered-multicast

  • all processes form a group
  • pi performs RTO-multicast(vi,g)
  • pi sets di = mi where mi is the first msg

delivered by RTO-multicast

  • termination guaranteed by reliable multicast
  • agreement and validity by definition of majority
  • could use max, min instead of majority if D is ordered
  • solving consensus using basic multicast in

the case where upto f processes crash

Dolev and Strong algorithm for

consensus in synchronous system

  • algorithm for process pi
  • initally Valuesi[1] = {vi} Valuesi[0] = {};
  • round r (1 ≤r≤f+1)
    • B-multicast(g, Valuesi[r] – Valuesi[r-1])
    • Valuesi[r+1] = Valuesi[r]
    • while (in round r)
      • On B-deliver(Vj) from pj
      • Valuesi[r+1] = Valuesi*r+1+ ∪ Vj
  • after (f + 1) rounds
    • set di = min(Valuesi[f+1])

BG in synchronous system

impossibility with N ≤ 3f

  • Lamport et al. suggested solution in the

synchronous message passing model

  • bounded computation delay
  • bounded message delay
  • bounded clock drift