1.15k likes | 1.3k Views
The iterated shared memory model of computation and an enrichment with safe-consensus tasks. Rodolfo Conde Joint work with Sergio Rajsbaum Instituto de Matem á ticas Universidad Nacional Autónoma de México GETCO 2010. The Model. The Iterated Snapshot Shared Memory model.
E N D
The iterated shared memory model of computation and an enrichment with safe-consensus tasks Rodolfo Conde Joint work with Sergio Rajsbaum Instituto de Matemáticas Universidad Nacional Autónoma de México GETCO 2010
The Model Rodolfo Conde and Sergio Rajsbaum
TheIteratedSnapshotSharedMemorymodel • We have n processes that communicate using a memory SM[i][0…n] (i ≥ 0) of Read/Write registers Rodolfo Conde and Sergio Rajsbaum
TheIteratedSnapshotSharedMemorymodel • The computation proceeds in rounds Rodolfo Conde and Sergio Rajsbaum
TheIteratedSnapshotSharedMemorymodel • In each round, a process P can atomically write to SM[i][P] 0 1 1 Rodolfo Conde and Sergio Rajsbaum
TheIteratedSnapshotSharedMemorymodel • each process can atomically read all of SM[i] 0 1 1 Rodolfo Conde and Sergio Rajsbaum
TheIteratedSnapshotSharedMemorymodel • In each round, the processes use a new memory array 0 0 1 1 0 1 Rodolfo Conde and Sergio Rajsbaum
Asynchronous • The n processes are asynchronous • Arbitrary delays of any kind Rodolfo Conde and Sergio Rajsbaum
Wait-Free • The protocols are wait-free • All but one process can crash • A process cannot wait to hear from another process ? Rodolfo Conde and Sergio Rajsbaum
Generic Iterated Snapshot protocol init r := 0; sm := input, dec := NULL; loopforever r := r + 1; SM[r].write(sm); sm := SM[r].snapshot(); /* Local computing */ endloop Rodolfo Conde and Sergio Rajsbaum
Generic Iterated Snapshot protocol init r := 0; sm := input, dec := NULL; loopforever r := r + 1; SM[r].write(sm); sm := SM[r].snapshot(); /* Local computing */ endloop PwritessmtoSM[r][P] Rodolfo Conde and Sergio Rajsbaum
Generic Iterated Snapshot protocol init r := 0; sm := input, dec := NULL; loopforever r := r + 1; SM[r].write(sm); sm := SM[r].snapshot(); /* Local computing */ endloop P reads all the array SM[r] Rodolfo Conde and Sergio Rajsbaum
Two processes protocol • One possible execution is the following: the two processes read and write concurrently WR RD WR RD 0 1 Rodolfo Conde and Sergio Rajsbaum
Two processes protocol • We can represent this execution as a 1-simplex WR RD WR RD 0 1 Rodolfo Conde and Sergio Rajsbaum
Two processes protocol • Each vertex represents the process view of the memory WR RD WR RD 0 1 01 01 Rodolfo Conde and Sergio Rajsbaum
Two processes protocol • Another possible execution: One process is faster that the other WR RD WR RD WR RD WR RD 0 1 0 1 01 01 Rodolfo Conde and Sergio Rajsbaum
Two processes protocol • The red process only sees itself, but the green can see both of them WR RD WR RD WR RD WR RD 0 1 0 1 01 01 0 Rodolfo Conde and Sergio Rajsbaum
Two processes protocol • And the last possibility WR RD WR RD WR RD WR RD WR RD WR RD 1 0 0 1 0 1 01 01 0 Rodolfo Conde and Sergio Rajsbaum
Two processes protocol • And the last possibility WR RD WR RD WR RD WR RD WR RD WR RD 0 1 0 0 1 1 1 01 01 0 Rodolfo Conde and Sergio Rajsbaum
Protocol complex (1 round) 1 01 01 0 Rodolfo Conde and Sergio Rajsbaum
The 2nd round • The input for the 2nd round is any possible state after the first round WR RD WR RD 0 1 01 01 Rodolfo Conde and Sergio Rajsbaum
The 2nd round • And the three possibilities repeat WR RD WR RD WR RD WR RD 0 1 0 1 01 01 Rodolfo Conde and Sergio Rajsbaum
The 2nd round • And the three possibilities repeat WR RD WR RD WR RD WR RD 0 1 0 1 01 01 Rodolfo Conde and Sergio Rajsbaum
The 2nd round • And the three possibilities repeat WR RD WR RD WR RD WR RD 0 1 0 1 01 01 Rodolfo Conde and Sergio Rajsbaum
Two processes protocols in the iterated model • Given a possible input: • Each execution of a round is represented as a 1-simplex • All possible executions are represented as a simplicial complex (subdivision of a line) Rodolfo Conde and Sergio Rajsbaum
Three processes protocols • The state after an execution can be described by a triangle (2-simplex) WR RD WR RD WR RD 0 0 0 Rodolfo Conde and Sergio Rajsbaum
Three processes protocols • The state after an execution can be described by a triangle (2-simplex) WR RD WR RD WR RD 0 0 0 000 00 00 Rodolfo Conde and Sergio Rajsbaum
Protocol complex (1st round) Rodolfo Conde and Sergio Rajsbaum
Protocol complex (1st round) WR RD WR RD WR RD 0 0 0 Rodolfo Conde and Sergio Rajsbaum
Protocol complex (1st round) WR RD WR RD WR RD 0 0 0 Rodolfo Conde and Sergio Rajsbaum
Protocol complex (1st round) WR RD WR RD WR RD 0 0 0 Rodolfo Conde and Sergio Rajsbaum
Protocol complex (1st round) WR RD WR RD WR RD 0 0 0 Rodolfo Conde and Sergio Rajsbaum
Protocol complex (3 processes) • For the 2nd round • Each triangle (state) of the 1st round subdivides in the same way • Because we work in an iterated model • Recursive behaviour Rodolfo Conde and Sergio Rajsbaum
Rercursive behaviour (2nd round) Rodolfo Conde and Sergio Rajsbaum
Rercursive behaviour (2nd round) Rodolfo Conde and Sergio Rajsbaum
Rercursive behaviour (2nd round) Rodolfo Conde and Sergio Rajsbaum
Protocol complex (2nd round) Rodolfo Conde and Sergio Rajsbaum
In general • For n + 1 processes: • Each state of a protocol is represented as a n-simplex • The executions of a protocol are represented as a n-dimensional complex • A subdivision of the n-simplex !! [Gafni & Borowsky] Rodolfo Conde and Sergio Rajsbaum
The (n,k)-set agreement task[S. Chaudhuri, 90] Set agreement Rodolfo Conde and Sergio Rajsbaum
The (n,k)-set agreement task [S. Chaudhuri, 90] 2 7 9 Processes start with private input values from a domain I (|I| ≥ n) Set agreement Rodolfo Conde and Sergio Rajsbaum
The (n,k)-set agreement task [S. Chaudhuri, 90] 2 7 9 7 7 2 Their outputs must agree on at most k < n distinct values Set agreement Rodolfo Conde and Sergio Rajsbaum
Impossibility of (3,2)-set agreement in theIteratedmodel • We can use the geometric view of distributed protocols to show this remarkable result. • The basic idea is as follows: • Assume a protocol exists. • Find an execution of this protocol (using the protocol complex) where processes decide 3 values !!! Rodolfo Conde and Sergio Rajsbaum
Suppose a protocol exists • Consider an input where processes have as input values their own ids • Run the protocol until processes decide Rodolfo Conde and Sergio Rajsbaum
Suppose a protocol exists • Because we work in the iterated model • The protocol complex is a subdivision of the triangle • We can colour the vertices with the decision each process takes • This colouring satisfies the hypothesis of Sperner’s Lemma Rodolfo Conde and Sergio Rajsbaum
We apply Sperner’s lemma to the subdivided complex • By Sperner’s Lemma, at least one simplex has all three colours • This simplex corresponds to an execution where processes decide three distinct values !!! Rodolfo Conde and Sergio Rajsbaum
In summary • The iterated model • Executions are represented as simplicial complexes • Simple recursive structure Rodolfo Conde and Sergio Rajsbaum
In summary • The set agreement task is impossible to solve [Borowsky & Gafni, Saks & Zaharoglou, Herlihy & Shavit, 93] • The iterated model is equivalent to the usual read/write model [Borowsky & Gafni, 97] • Set agreement result is valid in the usual model (but easier to prove in the iterated model) Rodolfo Conde and Sergio Rajsbaum
We can enrich the Iterated model with more powerful objects Rodolfo Conde and Sergio Rajsbaum
The safe-consensus task Rodolfo Conde and Sergio Rajsbaum
The safe-consensus task[Afek, Gafni & Lieber, 09] Safe-consensus Rodolfo Conde and Sergio Rajsbaum