Principles of Reliable Distributed Systems Recitation 7: Sbased Consensus - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Principles of Reliable Distributed Systems Recitation 7: Sbased Consensus

Description:

wait for (r,est) from n-t processes. if any non- est received then val est ... it has received (r, est) from a majority of processes ... update est to v (why? ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 13
Provided by: idi3
Category:

less

Transcript and Presenter's Notes

Title: Principles of Reliable Distributed Systems Recitation 7: Sbased Consensus


1
Principles of Reliable Distributed Systems
Recitation 7 ?S-based Consensus
  • Spring 2006
  • Eddie Bortnikov Aran Bergman

2
The Model
  • Asynchronous model
  • n gt 1 processes, t crash failures
  • Failure detectors
  • ?P strong completeness, eventual strong accuracy
  • ?S strong completeness, eventual weak accuracy
  • Lower bound for consensus
  • With ?S, we need n gt 2t

3
ltgtS-based Consensus Mostefaoui, Raynal 99
  • val ? input est ? ?
  • for r 0,1, 2, do
  • coord ? (r mod n)1
  • if I am coord, then send (r,val) to all
  • wait for ( (r, val) from coord OR suspect coord
    (by ?S))
  • if receive val from coord then est ? val else est
    ? ?
  • send (r, est) to all
  • wait for (r,est) from n-t processes
  • if any non-? est received then val ? est
  • if all ests have same non-? value v then
  • send (decide, v) to all
  • return(v)
  • od
  • Upon receive (decide, v), forward to all
    return(v)

4
Some Definitions
  • Asynchronous round made of 2 phases
    (communication steps)
  • Each round is managed by a coordinator
  • Asynchronous communication step
  • Phase I starts when the coordinator sends (r,
    val) (or not) and terminates for each pi when it
    receives (r,v) or when it suspects coord.
  • Phase II starts when pi sends (r, est) and
    terminates when it receives (r, est) from n-t
    processes.
  • Rounds do not start and end at the same time in
    all processes (asynchrony)

5
MR Principles Phase 1
  • The purpose of the 1st phase
  • Ensure that for every pi, esti ? valcoord, ?
  • Progress
  • Why does the 1st phase terminate?

6
MR Principles Phase 2
  • The purpose of the 2nd phase
  • Ensure that the Agreement property is never
    violated
  • If process pi decides v during r, and if process
    pj progresses to r1, then pj does it with est
    v.
  • Progress
  • Why does the 2nd phase terminate?

7
Second Phase
  • A process pi finishes the 2nd phase when it has
    received (r, est) from a majority of processes
  • Why is the majority important?
  • Every two majority sets intersect
  • If one process got n-t values of v, then some
    other process got at least one value of v

8
Second Phase (contd)
  • Notation
  • v valcoord
  • reci the set of received est values at the end
    of phase II.
  • reci ? or v or v, ?
  • Consider three cases
  • reci v ? (recj v) or (recj ?, v)
    ? decide v
  • reci ? ? (recj ?) or (recj ?, v)
    ? skip to the next round
  • reci v,? ? (recj v) or (recj ?) or
    (recj ?, v)
  • ? update est to v
    (why?)

9
What do we need decide for?
  • val ? input est ? ?
  • for r 0,1, 2, do
  • coord ? (r mod n)1
  • if I am coord, then send (r,val) to all
  • wait for ( (r, val) from coord OR suspect coord
    (by ?S))
  • if receive val from coord then est ? val else est
    ? ?
  • send (r, est) to all
  • wait for (r,est) from n-t processes
  • if any non-? est received then val ? est
  • if all ests have same non-? value v then
  • send (decide, v) to all
  • return(v)
  • od

10
n4, t1
v
v
v
v
v
v
v
return(v)
Suspect p1
?
v
v
Round 1
Round 2
11
Disseminating the decision
  • Q ok, so we need the 1st decide. Why forward
    to all?
  • A to prevent a process from blocking forever. A
    process that decides uses reliable broadcast to
    disseminate its decision value.

12
n4, t1
v
v
v
v
return(v)
v
v
v
v
v
Suspect p1
?
v
v
Round 1
Round 2
Write a Comment
User Comments (0)
About PowerShow.com