![Page 1: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/1.jpg)
N-Consensus is the Second Strongest Object for N+1
Processes
Eli Gafni UCLA
Petr Kuznetsov Max Planck Institute for
Software Systems
![Page 2: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/2.jpg)
2
Distributed shared memory
Processes communicate via objects Each object is an instance of a type
Type N-consensus: first N operations propose(v), v∈{0,1} return the argument of the first operation, N+1-th fails
Object types can be classified by their consensus power
![Page 3: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/3.jpg)
3
Consensus power
Cons(T)=N iff objects of T and RW registers can implement N-consensus but not N+1-consensus
N-consensus is universal in a system of N processes : can implement an object of any type [Her91]
![Page 4: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/4.jpg)
4
What about N or more processes?
Can objects of consensus power N “do more” than N-consensus objects?
No: if an N+1-process task can be solved by deterministic objects of consensus power N, then it can also be solved by N-consensus objects
⇨ There are no objects between N- and N+1-consensus
![Page 5: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/5.jpg)
5
Main results
Theorem 1. Any protocol over N+1 processes using deterministic objects of consensus power N is connected.
Theorem 2. Any connected protocol over N+1 processes can be emulated using N-consensus
![Page 6: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/6.jpg)
6
The rest of it
Definitions and tools Inseparability Theorem 1: connectivity of protocols Theorem 2: emulation Conclusions and future
![Page 7: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/7.jpg)
7
Processes and protocols
N+1 processes communicate via objects of consensus power N, RW registers
Protocol P: a collection of deterministic automata P1,…PN+1, assume a single initial state
![Page 8: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/8.jpg)
8
Objects and synchrony
Objects are atomic and deterministic: an execution of P can be seen as a sequence of process idsa state of P is a finite execution a view of Pi in x is the local state of Pi in x
System is asynchronous: we consider all possible executions2-consensus cannot be implemented using RW
registers N+1-consensus cannot be implemented using N-
consensus
![Page 9: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/9.jpg)
9
Some tools
2-process ε-agreement task for q0 and q1 If qi goes alone, qi outputs i outputs are within ε in [0,1](can be implemented using RW registers)
N-consensus can be used to split processes in two teams, each running as a single process in a 2-process RW protocol (e.g., ε-agreement)
![Page 10: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/10.jpg)
10
InseparabilityStates x0 and x1 of P are inseparable (x0~x1)
iff some process Pi cannot distinguish x0 and x1 even in an infinite execution
Pi goes through the same sequence of views
in e0 and e1
x1x0
e1e0
![Page 11: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/11.jpg)
11
Inseparably connected protocols
P is inseparably connected iff for each state x of P, the set G(x) of N+1 immediate descendants of x is transitively inseparable
x1
x2
xN xN+1
~ ~ ~ ~…
There is a path of inseparable states between any two
states in G(x)
…
x
![Page 12: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/12.jpg)
12
Connectivity and consensus power
Theorem 1. Any protocol over N+1 processes using deterministic objects of consensus power N is connected
Proof sketch: suppose some G(x) is ~ disconnected each execution extending x reveals the
component of G(x) we can solve consensus using x and P
(use determinism here)
![Page 13: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/13.jpg)
13
Emulation of connected protocols
Let P be connected Then we can emulate it using N-
consensus!
Emulation: Processes periodically output views of P
Safety: All output views are compatible with an execution of P
Liveness: at least one active process makes progress (outputs infinitely many views of P)
![Page 14: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/14.jpg)
14
Emulation invariants Each process maintains a local estimate
of the “current” state of P Asynchronous phases, at the end of
each phase:There are at most two different state
estimates, and they are inseparable At least one participant outputs a new view All views output so far are compatible with
both state estimates
![Page 15: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/15.jpg)
15
Phase description
Processes split in two teams q0 and q1
Each qi elects a member to promote: proposes a new “next” state xi and a new view vi
q0 and q1 runs ε-agreement and map the results to vertices of the non-separating path connecting x0 and x1
![Page 16: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/16.jpg)
16
Look in the future: x0~x1
Go along inseparable executions until a confusing view v
![Page 17: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/17.jpg)
17
Look in the future: x0 and x1 are not inseparable
But their parents x0’ and x1’ are – concatenate the paths
![Page 18: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/18.jpg)
18
Choosing the next state: safety
ε=Ω(1/N): the decided vertices are neighbors
Neighboring states are inseparable
Each view is compatible with neighboring states: safety is guaranteed!
![Page 19: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/19.jpg)
19
Joining a team: liveness
In every phase, a process:
Try to agree on the system state using N-consensus
If succeeded, join team q0 If failed (only if N came earlier)– join q1
≤N processes participate ⇨ q1 is empty Only a participant obtains a new view:
liveness is guaranteed!
![Page 20: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/20.jpg)
20
A corollary that matters
Let P be any protocol that solves a task M
A non-blocking emulation of P is also wait-free: every active process makes progress
Every N+1-process task that can be solved by objects of consensus power N can also be solved by N-consensus objects
![Page 21: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/21.jpg)
21
Summary
Inseparability (a general connectivity) Emulation of any connected protocol
In a system of N+1 processes, there is no object between N- and N+1-consensus
![Page 22: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/22.jpg)
22
Related questions Can objects of consensus power N be
implemented by N-consensus objects?Common2 class: is queue in it? [Afek et al. 93,
…]
How to emulate a protocol P that uses objects of two types, each of consensus power NRobustness [Jay93,…]
Non-determinism?
![Page 23: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/23.jpg)
23
Thank you!
![Page 24: N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems](https://reader035.vdocuments.net/reader035/viewer/2022062515/56649c755503460f94928c76/html5/thumbnails/24.jpg)
24
Deterministic objects
Q, set of states O, set of operations R, set of responses σ, Q x O → Q x R, sequential specification
RW-register: a read returns the most recent written value
N-consensus: first N agree on a proposed value, N+1-th fails