Presentation is loading. Please wait.

Presentation is loading. Please wait.

Solvability of Colorless Tasks in Different Models

Similar presentations


Presentation on theme: "Solvability of Colorless Tasks in Different Models"— Presentation transcript:

1 Solvability of Colorless Tasks in Different Models
Companion slides for Distributed Computing Through Combinatorial Topology Maurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAA 1

2 Distributed Computing through Combinatorial Topology
Road Map Overview of Models t-resilient layered snapshot models Layered Snapshots with k-set agreement Adversaries Message-Passing Systems Decidability Distributed Computing through Combinatorial Topology

3 Distributed Computing through Combinatorial Topology
Road Map Overview of Models t-resilient layered snapshot models Layered Snapshots with k-set agreement Adversaries Message-Passing Systems Decidability Distributed Computing through Combinatorial Topology

4 Skeleton boo! C skel1 C skel0 C

5 Distributed Computing through Combinatorial Topology
Parameter p Model characterized by parameter p, 0 · p · n (I,O,¢) has a wait-free protocol iff there is a continuous map f: |skelp I|  |O| carried by ¢. Distributed Computing through Combinatorial Topology

6 Dimension of Skeleton map vs Computational Power
harder than 1-skeleton map Distributed Computing through Combinatorial Topology

7 Wait-Free Layered Immediate Snapshots
Up to n out of n+1 can crash Just can’t wait (to be king) (I,O,¢) has a wait-free protocol … if and only if … there is a continuous map f: |skeln I|  |O| carried by ¢. Distributed Computing through Combinatorial Topology

8 t-resilient Layered Immediate Snapshots
Up to t out of n+1 can crash OK to wait for n-t+1 (I,O,¢) has a wait-free protocol … if and only if … there is a continuous map f: |skelt I|  |O| carried by ¢. Distributed Computing through Combinatorial Topology

9 Wait-Free Layered Immediate Snapshot with k-set Agreement
shared black boxes that solve k-set agreement (I,O,¢) has a wait-free protocol … if and only if … there is a continuous map f: |skelk-1 I|  |O| carried by ¢. Distributed Computing through Combinatorial Topology

10 Distributed Computing through Combinatorial Topology
Equivalent Models t-resilient model … wait-free + t+1-set agreement … have identical computational power! Distributed Computing through Combinatorial Topology

11 Distributed Computing through Combinatorial Topology
Decidability Is it decidable whether a task has a protocol in a model characterized by: f: |skelp I|  |O| ? decidable if and only if p · 1! Distributed Computing through Combinatorial Topology

12 Distributed Computing through Combinatorial Topology
Road Map Overview of Models t-resilient layered snapshot models Layered Snapshots with k-set agreement Adversaries Message-Passing Systems Decidability Distributed Computing through Combinatorial Topology

13 t-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l:= 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until |names(snap)| >= n+1-t view := values(snap) return δ(view) Distributed Computing through Combinatorial Topology

14 t-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until |names(snap)| >= n+1-t view := values(snap) return δ(view) 2-dimensional memory array row is clean per-layer memory As in the wait-free case, the processes share a two-dimensional memory array mem[\ell][i], where row $\ell$ is shared only by the processes participating in layer $\ell$, and column $i$ is written only by $P_i$. column is per-process word Distributed Computing through Combinatorial Topology

15 t-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until |names(snap)| >= n+1-t view := values(snap) return δ(view) initial view is input value Distributed Computing through Combinatorial Topology

16 t-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until |names(snap)| >= n+1-t view := values(snap) return δ(view) run for N layers Distributed Computing through Combinatorial Topology

17 t-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until |names(snap)| >= n+1-t view := values(snap) return δ(view) layer l : immediate write & snapshot of row l During layer $\ell$, $P_i$ writes its current view to \aaMem{\ell}{i}, \emph{waits} for $n+1-t$ views (including its own) to be written to that layer's row, Distributed Computing through Combinatorial Topology

18 t-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until |names(snap)| >= n+1-t view := values(snap) return δ(view) wait to hear from n+1-t processes waits for $n+1-t$ views (including its own) to be written to that layer's row, and then takes a snapshot of that row. The waiting step introduces no danger of deadlock because at least $n+1-t$ non-faulty processes will eventually reach each level and write their views. why is this safe? Distributed Computing through Combinatorial Topology

19 t-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until |names(snap)| >= n+1-t view := values(snap) return δ(view) new view is set of values seen Distributed Computing through Combinatorial Topology

20 t-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until |names(snap)| >= n+1-t view = values(snap) return δ(view) finally apply decision map to final view Distributed Computing through Combinatorial Topology

21 k-set Agreement 19 21 k = 2

22 Distributed Computing through Combinatorial Topology
(t+1)-Set Agreement view := input snap: array of Value = ; do immediate mem[0][i] := view; snap := snapshot(mem[0][*]) until |names(snap)| >= n+1-t return min(values(view)) Distributed Computing through Combinatorial Topology

23 (t+1)-Set Agreement view := input snap: array of Value = ;
do immediate mem[0][i] := view; snap := snapshot(mem[0][*]) until |names(snap)| >= n+1-t return min(values(view)) write input and take snapshot each process writes its input, waits until $n+1-t$ inputs have been written, and then chooses the least value read. Distributed Computing through Combinatorial Topology

24 (t+1)-Set Agreement view := input snap: array of Value = ; do
immediate mem[0][i] := view; snap := snapshot(mem[0][*]) until |names(snap)| >= n+1-t return min(values(view)) wait to hear from n+1-t processes Distributed Computing through Combinatorial Topology

25 (t+1)-Set Agreement view := input snap: array of Value = ; do
immediate mem[0][i] := view; snap := snapshot(mem[0][*]) until |names(snap)| >= n+1-t return min(values(view)) return least value in view can miss at most t lesser values most t+1 values returned Distributed Computing through Combinatorial Topology

26 Informal Skeleton Lemma
If We have a protocol for a task ... And A protocol for k-set agreement … Then If a protocol solves a colorless task $(\cI,\cO,\Delta)$, then we are free to add a pre-processing step to the protocol, where first the processes agree on at most $k$ of their inputs, where $k=t+1$, using the protocol shown earlier. WLOG, we can “pre-process” with k-set agreement. Distributed Computing through Combinatorial Topology

27 Distributed Computing through Combinatorial Topology
Skeleton Lemma If protocol (I, P, ¥) solves task (I,O,¢) And There is a k-set agreement protocol for I Then The composition of k-set agreement with (I,P,¥) also solves (I,O,¢). Distributed Computing through Combinatorial Topology

28 Informal Protocol Complex Lemma
WLOG We can assume that any protocol complex is a barycentric subdivision of the input complex. Distributed Computing through Combinatorial Topology

29 Informal Protocol Complex Lemma
WLOG We can assume that any protocol complex is a barycentric subdivision of the input complex. We may now combine the previous results to show that, for $t$-resilient colorless task solvability, we may assume without loss of generality that a protocol complex is a barycentric subdivision of the $t$-skeleton of the input complex. Distributed Computing through Combinatorial Topology

30 Protocol Complex Lemma
If There is a t-resilient layered protocol for (I,O,¢) ... Then Then there is a protocol (I,P,¥) such that … P = BaryN(skelt I) ¥(¾) = BaryN  skelt(¾). Distributed Computing through Combinatorial Topology

31 Distributed Computing through Combinatorial Topology
Theorem The colorless task (I,O,¢) has a t-resilient layered snapshot protocol … if and only if … there is a continuous map f: |skelt I|  |O| I skel1(I) carried by ¢. Distributed Computing through Combinatorial Topology

32 Distributed Computing through Combinatorial Topology
Protocol Implies Map May assume protocol complex is P = BaryN skelt I. decision map d: BaryN skelt I  O |d|: |BaryN skelt I|  |O| carried by ¢. |d|: |skelt I|  |O| Distributed Computing through Combinatorial Topology

33 Simplicial Approximation Theorem
Given a continuous map there is an N such that f has a simplicial approximation Not every continuous map $f:|\cA|~\to~|\cB|$ has a simplicial approximation mapping $\cA$ to $\cB$. The following theorem, however, states we can always find a simplicial approximation defined over a sufficiently refined subdivision of $\cA$. We won’t prove this theorem here, since the proof can be found in any elementary Topology textbook. 16-Nov-18

34 Distributed Computing through Combinatorial Topology
Map Implies Protocol f: |skelt I|  |O| carried by ¢. Á: BaryN skelt I  O Solve using … Solvability theorems for the other models are pretty much the same, except for the conditions under which we can solve barycentric and t-set agreement barycentric agreement t-set agreement Distributed Computing through Combinatorial Topology

35 Distributed Computing through Combinatorial Topology
Road Map Overview of Models t-resilient layered snapshot models Layered Snapshots with k-set agreement Adversaries Message-Passing Systems Decidability Distributed Computing through Combinatorial Topology

36 Distributed Computing through Combinatorial Topology
Motivation Today … Practically all modern multiprocessors provide synchronization more powerful than read-write … Like … test-and-set, compare-and-swap, …. Here … Practically all modern multiprocessor architectures provide synchronization primitives more powerful than simple read or write instructions. For example, the \emph{test-and-set} instruction atomically swaps the value \true{} for the contents of a memory location. If we augment layered snapshots with \emph{test-and-set}, for example, it is possible to solve wait-free $k$-set agreement for $k = \ceil{\frac{n+1}{2}}$ (see Exercise~\ref{exercise:ch05:ts}). In this section, we consider protocols constructed by \emph{composing} layered snapshot protocols with $k$-set agreement protocols. we consider protocols constructed by composing layered snapshot protocols with k-set agreement protocols. Distributed Computing through Combinatorial Topology

37 Wait-Free Layered Set Agreement Protocol
shared mem array 0..N-1,0..n of Value shared SA array 0..N-1 of SetAgree view := input for l:= 0 to N-1 do view: View := SA[l].decide(view) immediate mem[l][i] := view; snap := snapshot(mem[l][*]) view := values(snap) return δ(view) Distributed Computing through Combinatorial Topology

38 Wait-Free Layered Set Agreement Protocol
shared mem array 0..N-1,0..n of Value shared SA array 0..N-1 of SetAgree view := input for l := 0 to N-1 do view: View := SA[l].decide(view) immediate mem[l][i] := view; snap := snapshot(mem[l][*]) view := values(snap) return δ(view) per-level shared memory Distributed Computing through Combinatorial Topology

39 Wait-Free Layered Set Agreement Protocol
shared mem array 0..N-1,0..n of Value shared SA array 0..N-1 of k-SetAgree view := input for l := 0 to N-1 do view: View := SA[l].decide(view) immediate mem[l][i] := view; snap := snapshot(mem[l][*]) view := values(snap) return δ(view) per-level k-set agreement object Distributed Computing through Combinatorial Topology

40 Wait-Free Layered Set Agreement Protocol
shared mem array 0..N-1,0..n of Value shared SA array 0..N-1 of k-SetAgree view := input for l := 0 to N-1 do view: View := SA[l].decide(view) immediate mem[l][i] := view; snap := snapshot(mem[l][*]) view := values(snap) return δ(view) initial view is input value Distributed Computing through Combinatorial Topology

41 Wait-Free Layered Set Agreement Protocol
shared mem array 0..N-1,0..n of Value shared SA array 0..N-1 of k-SetAgree view := input for l := 0 to N-1 do view: View := SA[l].decide(view) immediate mem[l][i] := view; snap := snapshot(mem[l][*]) view := values(snap) return δ(view) do k-set agreement with others at this level Distributed Computing through Combinatorial Topology

42 Wait-Free Layered Set Agreement Protocol
shared mem array 0..N-1,0..n of Value shared SA array 0..N-1 of k-SetAgree view := input for l := 0 to N-1 do view: View := SA[l].decide(view) immediate mem[l][i] := view; snap := snapshot(mem[l][*]) view := values(snap) return δ(view) then do immediate snapshot Distributed Computing through Combinatorial Topology

43 Wait-Free Layered Set Agreement Protocol
shared mem array 0..N-1,0..n of Value shared SA array 0..N-1 of k-SetAgree view := input for l := 0 to N-1 do view: View := SA[l].decide(view) immediate mem[l][i] := view; snap := snapshot(mem[l][*]) view := values(snap) return δ(view) new view is set of values seen Distributed Computing through Combinatorial Topology

44 Protocol Complex Lemma
If (I,P,¥) is a k-set layered snapshot protocol … then P is equal to BaryN skelk-1 I, … for some N ¸ 0. Distributed Computing through Combinatorial Topology

45 Distributed Computing through Combinatorial Topology
Theorem The colorless task (I,O,¢) has a wait-free k-set layered snapshot protocol … if and only if … there is a continuous map f: |skelk-1 I|  |O| carried by ¢. Distributed Computing through Combinatorial Topology

46 Distributed Computing through Combinatorial Topology
Theorem The colorless task (I,O,¢) has a wait-free k-set layered snapshot protocol … if and only if … there is a continuous map f: |skelk-1 I|  |O| carried by ¢. k-1 skeleton, not t-skeleton! Distributed Computing through Combinatorial Topology

47 Distributed Computing through Combinatorial Topology
Road Map Overview of Models t-resilient layered snapshot models Layered Snapshots with k-set agreement Adversaries Message-Passing Systems Decidability Distributed Computing through Combinatorial Topology

48 Distributed Computing through Combinatorial Topology
Wait-Free All but one can fail A $t$-resilient protocol is designed under the assumption that failures are uniform: any} $t$ out of $n+1$ processes can fail. Often, however, failures are correlated. In a distributed system, processes running on the same node, in the same network partition, or managed by the same provider may be more likely to fail together. In a~multiprocessor, processes running on the same core, on the same processor, or on the same card may be likely to fail together. It is often possible to design more effective fault-tolerant algorithms if we can exploit knowledge of which potential failures are correlated and which are not. Distributed Computing through Combinatorial Topology

49 Distributed Computing through Combinatorial Topology
t-resilient · t can fail Distributed Computing through Combinatorial Topology

50 Distributed Computing through Combinatorial Topology
Irregular Failures Same server Different servers Distributed Computing through Combinatorial Topology

51 Distributed Computing through Combinatorial Topology
Adversaries Walt Disney 16-Nov-18 Distributed Computing through Combinatorial Topology

52 Distributed Computing through Combinatorial Topology
Faulty Sets These can fail Or this … Distributed Computing through Combinatorial Topology

53 Faulty Sets Closed under Containment
If both can fail … Never require failures So can only one Distributed Computing through Combinatorial Topology

54 Distributed Computing through Combinatorial Topology
Failure Complex Vertex per process 16-Nov-18 Distributed Computing through Combinatorial Topology

55 Distributed Computing through Combinatorial Topology
Failure Complex Simplex = faulty set Vertex per process 16-Nov-18 Distributed Computing through Combinatorial Topology

56 Irregular Failure Complex
16-Nov-18 Distributed Computing through Combinatorial Topology

57 Wait-Free Failure Complex
(n-1)-skeleton 16-Nov-18 Distributed Computing through Combinatorial Topology

58 t-resilient Failure Complex
(t-1)-skeleton 16-Nov-18 Distributed Computing through Combinatorial Topology

59 Cores Minimal set of processes that cannot all fail
Safe to wait for at least one member of a particular core to show up 16-Nov-18 Distributed Computing through Combinatorial Topology

60 Cores & Failure Complex
Minimal simplex not in failure complex 16-Nov-18 Distributed Computing through Combinatorial Topology

61 Irregular Failure Complex
16-Nov-18 Distributed Computing through Combinatorial Topology

62 Wait-Free Failure Complex
All n+1 processes only core 16-Nov-18 Distributed Computing through Combinatorial Topology

63 t-resilient Failure Complex
Any set of t+1 processes is a core Any t-simplex is a core 16-Nov-18 Distributed Computing through Combinatorial Topology

64 Cores For many models, minimum core size…
Completely determines adversary’s power to solve any colorless task! So adversaries with same min core size solve the same colorless tasks 16-Nov-18 Distributed Computing through Combinatorial Topology

65 Survivor Sets Minimal set of processes that might all survive
Safe to wait for all members of some survivor set to show up Dual to cores: each one determines the other 16-Nov-18 Distributed Computing through Combinatorial Topology

66 Survivor Sets in Failure Complex
Complementary simplex in failure complex 16-Nov-18 Distributed Computing through Combinatorial Topology

67 Irregular Failure Complex
Survivor Sets 16-Nov-18 Distributed Computing through Combinatorial Topology

68 Wait-Free Failure Complex
Any individual process is a survivor set Any vertex 16-Nov-18 Distributed Computing through Combinatorial Topology

69 t-resilient Failure Complex
Any set of n-t+1 processes is a survivor set Any (n-t)-simplex 16-Nov-18 Distributed Computing through Combinatorial Topology

70 A-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until names(snap) µ survivor set view := values(snap) return δ(view) Distributed Computing through Combinatorial Topology

71 A-Resilient Layered Immediate Snapshot Protocol
shared mem array 0..N-1,0..n of Value view := input for l := 0 to N-1 do do immediate mem[l][i] := view; snap := snapshot(mem[l][*]) until names(snap) µ survivor set view := values(snap) return δ(view) wait to hear from a survivor set why is this safe? Distributed Computing through Combinatorial Topology

72 Distributed Computing through Combinatorial Topology
Road Map Overview of Models t-resilient layered snapshot models Layered Snapshots with k-set agreement Adversaries Message-Passing Systems Decidability Distributed Computing through Combinatorial Topology

73 Distributed Computing through Combinatorial Topology
Message Passing There are n+1 asynchronous processes … that send and receive messages … via a fully-connected communication network. Message delivery is reliable and FIFO Distributed Computing through Combinatorial Topology

74 Message-Passing Protocols
decide after finite # steps but protocol forwards messages … forever! Distributed Computing through Combinatorial Topology

75 Distributed Computing through Combinatorial Topology
Communication Syntax send(P, v0, …, vl) to Q send(P, v0, …, vl) to all In our examples, we use the following notation. A process $P$ sends a message containing values $v_0, \ldots, v_\ell$ to $Q$ as follows: \begin{lstlisting}[numbers=none,frame=none] send`$(P, v_0, \ldots, v_\ell)$` to `$Q$` \end{lstlisting} We say that a process \emph{broadcasts} a message if it sends that message to all processes, including itself: send`$(P, v_0, \ldots, v_\ell)$` to all Here is how $Q$ receives a message from $P$: upon receive`$(P, v_0, \ldots, v_\ell)$` do ... // do something with the values received upon receive(P, v0, …, vl) do ... // handle message Distributed Computing through Combinatorial Topology

76 Distributed Computing through Combinatorial Topology
Forwarding background // forward messages forever upon receive(Pj,v) do send(Pi,v) to all Some message-passing protocols require that each time a process receives a message from another, the receiver forwards that message to all processes. Each process must continue to forward messages even after it has chosen its output value. Without such a guarantee, a non-faulty process that chooses an output and falls silent is indistinguishable from a crashed process, implying that tasks requiring a majority of processes to be non-faulty become impossible. We think of this continual forwarding as a kind of operating system service, running in the background, interleaved with steps of the protocol itself. Distributed Computing through Combinatorial Topology

77 Get Values from n+1-t Processes
getQuorum(): Set of Value V: Set of Value := ; q: int := 0 do upon receive(Q,v) do V := V [ {v} q := q + 1 until q = n+1-t return V Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

78 Get Values from n+1-t Processes
getQuorum(): Set of Value V: Set of Value := ; q: int := 0 do upon receive(Q,v) do V := V [ {v} q := q + 1 until q = n+1-t return V Initially, nothing. Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

79 Get Values from n+1-t Processes
getQuorum(): Set of Value V: Set of Value := ; q: int := 0 do upon receive(Q,v) do V := V [ {v} q := q + 1 until q = n+1-t return V remember values and count Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

80 Get Values from n+1-t Processes
getQuorum(): Set of Value V: Set of Value := ; q: int := 0 do upon receive(Q,v) do V := V [ {v} q := q + 1 until q = n+1-t return V safe to wait for n+1-t values Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

81 Get Values from n+1-t Processes
getQuorum(): Set of Value V: Set of Value := ; q: int := 0 do upon receive(Q,v) do V := V [ {v} q := q + 1 until q = n+1-t return V return values when enough received Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

82 Protocol for (t+1)-Set Agreement
SetAgree(vi): value send(P, vi) to all V: Set of Value := getQuorum() return min(V) Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

83 Protocol for (t+1)-Set Agreement
SetAgree(v): value send(P, v) to all V: Set of Value := getQuorum() return min(V) broadcast my value Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

84 Protocol for (t+1)-Set Agreement
SetAgree(v): value send(P, v) to all V: Set of Value := getQuorum() return min(V) Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. get values from all but t Distributed Computing through Combinatorial Topology

85 Protocol for (t+1)-Set Agreement
SetAgree(v): value send(P, v) to all V: Set of Value := getQuorum() return min(V) return min value received Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. possible to “miss” only t lesser values Distributed Computing through Combinatorial Topology

86 Barycentric Agreement
Informally, the processes start out on vertexes of a single simplex $\sigma$ of $\cI$, and they eventually halt on vertexes of a single simplex of $\Delta(\sigma) \subseteq \cI$. I Bary I Distributed Computing through Combinatorial Topology

87 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

88 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi Set of messages Pi has received Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

89 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi keep track of confirmations received so far Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

90 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi get confirmation from each non-faulty process Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

91 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi broadcast message set received Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

92 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi collect responses Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

93 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi remember if message confirms my view Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

94 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi otherwise learned something new, start over Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

95 Barycentric Agreement Protocol
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. return when enough agree Distributed Computing through Combinatorial Topology

96 Wait, There’s More! background upon receive(Pj, Vj) do Vi := Vi [ Vj
send(Pi, Vi) to all Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. the operating system runs forever … Distributed Computing through Combinatorial Topology

97 Wait, There’s More! keep forwarding new values background
upon receive(Pj, Vj) do Vi := Vi [ Vj send(Pi, Vi) to all Each process assembles values from as many other processes as possible. The getQuorum() method collects values until it has received messages from all but $t$ processes. It is safe to wait for that many messages because there are at least $n+1-t$ non-faulty processes. It is not safe to wait for more, because the remaining $t$ processes may have crashed. Distributed Computing through Combinatorial Topology

98 Lemma: Protocol Terminates
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi Suppose BWOC Pi runs forever … Eventually Vi assumes final value V … Non-faulty Pj, where Vj = V’, receives V Pj must have sent Vj to Pi Vj ½ V OR Vj = V Pj will sent V to Pi Pj has sent V to Pi Distributed Computing through Combinatorial Topology

99 All Vi, Vj Totally Ordered
BaryAgree(vi: Vertex): set of Vertex Vi: set of Vertex := {vi} count: int := 0 while count < n+1-t do send(Pi, Vi) to all on receive(Pj, Vj) do if Vi = Vj then count := count + 1 else if Vj n Vi  ; then Vi := Vi [ Vj count := 0 return Vi If Pi broadcasts V(0), …, V(k), then V(i) ½ V(i+1) To decide … Pi received Vi from X, |X| ¸ n+1-t Pj received Vj from Y, |Y| ¸ n+1-t some Pk 2 X Å Y sent both Vi, Vj so Vi, Vj are ordered. Distributed Computing through Combinatorial Topology

100 Distributed Computing through Combinatorial Topology
Theorem For 2t < n+1, colorless task (I,O,¢) has a t-resilient message-passing protocol … if and only if … there is a continuous map f: |skelt I|  |O| carried by ¢. Distributed Computing through Combinatorial Topology

101 Distributed Computing through Combinatorial Topology
Theorem For 2t < n+1, colorless task (I,O,¢) has a t-resilient message-passing protocol … if and only if … there is a continuous map f: |skelt I|  |O| carried by ¢. same as snapshot when 2t < n+1! Distributed Computing through Combinatorial Topology

102 Distributed Computing through Combinatorial Topology
Road Map Overview of Models t-resilient layered snapshot models Layered Snapshots with k-set agreement Adversaries Message-Passing Systems Decidability Distributed Computing through Combinatorial Topology

103 Automatic Proofs? What if we could program a Turing machine
to tell whether a task has a protocol? In wait-free read-write memory? Or other models? We could … automatically generate conference papers No need for grad students 16-Nov-18

104 Alas no Whether a protocol exists for a task in …
Read-write memory for 3+ processes … Read-write memory & k-set agreement … for k > 2 Is undecidable. 16-Nov-18

105 Three rendez-vous points
Loop Agreement Complex Loop Three rendez-vous points 16-Nov-18

106 One Rendez-Vous Point Input Output 16-Nov-18

107 Two Rendez-Vous Points
Input Output Any simplex on path between 16-Nov-18

108 Three Rendez-Vous Points
Input Output Any simplex 16-Nov-18

109 Contractibility contractible not contractible 16-Nov-18

110 Solvable Iff Loop Contractible
InputComplex Output Complex 16-Nov-18

111 Undecidability But Contractiblity is undecidable …
even for finite complexes! (reduces to the word problem for finitely-presented groups) Undecidable whether a task has a protocol in wait-free read-write memory 16-Nov-18

112 Other Models Wait-free read-write memory plus k-set agreement , for k > 2 Solvable iff f: skelk-1 I*  O* exists … Implies contractible, for k > 2 Undecidable whether a task has a protocol in wait-free read-write memory plus k-set agreement , for k > 2 16-Nov-18

113 Distributed Computing through Combinatorial Topology
          This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work to “Distributed Computing through Combinatorial Topology” (but not in any way that suggests that the authors endorse you or your use of the work). Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this license impairs or restricts the author's moral rights. Distributed Computing through Combinatorial Topology


Download ppt "Solvability of Colorless Tasks in Different Models"

Similar presentations


Ads by Google