the iterated shared memory model of computation and an enrichment with safe-consensus tasks
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/1.jpg)
The iterated shared memory model of computation and an enrichment
with safe-consensus tasks
Rodolfo CondeJoint work with Sergio Rajsbaum
Instituto de MatemáticasUniversidad Nacional Autónoma de México
GETCO 2010
![Page 2: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/2.jpg)
The Model
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 3: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/3.jpg)
The Iterated Snapshot Shared Memory model
• We have n processes that communicate using a memory SM[i][0…n] (i ≥ 0) of Read/Write registers
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 4: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/4.jpg)
The Iterated Snapshot Shared Memory model
• The computation proceeds in rounds
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 5: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/5.jpg)
The Iterated Snapshot Shared Memory model
• In each round, a process P can atomically write to SM[i][P]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 11
![Page 6: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/6.jpg)
The Iterated Snapshot Shared Memory model
• each process can atomically read all of SM[i]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 11
![Page 7: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/7.jpg)
The Iterated Snapshot Shared Memory model
• In each round, the processes use a new memory array
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 11
0 10
![Page 8: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/8.jpg)
Asynchronous
• The n processes are asynchronous– Arbitrary delays of any kind
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 9: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/9.jpg)
Wait-Free
• The protocols are wait-free– All but one process can crash– A process cannot wait to hear from another
process
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
?
![Page 10: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/10.jpg)
Generic Iterated Snapshot protocolinit r := 0; sm := input, dec := NULL;
loop foreverr := r + 1;SM[r].write(sm);sm := SM[r].snapshot();
/* Local computing */end loop
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 11: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/11.jpg)
Generic Iterated Snapshot protocolinit r := 0; sm := input, dec := NULL;
loop foreverr := r + 1;SM[r].write(sm);sm := SM[r].snapshot();
/* Local computing */end loop
P writes sm to SM[r][P]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 12: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/12.jpg)
Generic Iterated Snapshot protocolinit r := 0; sm := input, dec := NULL;
loop foreverr := r + 1;SM[r].write(sm);sm := SM[r].snapshot();
/* Local computing */end loop
P reads all the array SM[r]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 13: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/13.jpg)
Two processes protocol
• One possible execution is the following: the two processes read and write concurrently
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
![Page 14: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/14.jpg)
Two processes protocol
• We can represent this execution as a 1-simplex
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
![Page 15: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/15.jpg)
Two processes protocol
• Each vertex represents the process view of the memory
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
![Page 16: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/16.jpg)
Two processes protocol
• Another possible execution: One process is faster that the other
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
0 WRRD
1 WRRD
![Page 17: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/17.jpg)
Two processes protocol
• The red process only sees itself, but the green can see both of them
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
0 WRRD
1 WRRD
0
![Page 18: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/18.jpg)
Two processes protocol
• And the last possibility
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
0 WRRD
1 WRRD
0
0 WRRD
1 WRRD
![Page 19: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/19.jpg)
Two processes protocol
• And the last possibility
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
0 WRRD
1 WRRD
0
0 WRRD
1 WRRD
1
![Page 20: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/20.jpg)
Protocol complex (1 round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
01 01 01
![Page 21: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/21.jpg)
The 2nd round
• The input for the 2nd round is any possible state after the first round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
![Page 22: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/22.jpg)
The 2nd round
• And the three possibilities repeat
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
0 WRRD
1 WRRD
![Page 23: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/23.jpg)
The 2nd round
• And the three possibilities repeat
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
0 WRRD
1 WRRD
![Page 24: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/24.jpg)
The 2nd round
• And the three possibilities repeat
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
1 WRRD
01 01
0 WRRD
1 WRRD
![Page 25: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/25.jpg)
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)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 26: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/26.jpg)
Three processes protocols
• The state after an execution can be described by a triangle (2-simplex)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
0 WRRD
0 WRRD
![Page 27: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/27.jpg)
Three processes protocols
• The state after an execution can be described by a triangle (2-simplex)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
0 WRRD
0 WRRD
000
00
00
![Page 28: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/28.jpg)
Protocol complex (1st round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 29: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/29.jpg)
Protocol complex (1st round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
0 WRRD
0 WRRD
![Page 30: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/30.jpg)
Protocol complex (1st round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
0 WRRD
0 WRRD
![Page 31: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/31.jpg)
Protocol complex (1st round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
0 WRRD
0 WRRD
![Page 32: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/32.jpg)
Protocol complex (1st round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
0 WRRD
0 WRRD
0 WRRD
![Page 33: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/33.jpg)
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
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 34: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/34.jpg)
Rercursive behaviour (2nd round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 35: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/35.jpg)
Rercursive behaviour (2nd round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 36: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/36.jpg)
Rercursive behaviour (2nd round)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 37: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/37.jpg)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Protocol complex (2nd round)
![Page 38: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/38.jpg)
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]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 39: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/39.jpg)
The (n,k)-set agreement task[S. Chaudhuri, 90]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Set agreement
![Page 40: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/40.jpg)
The (n,k)-set agreement task [S. Chaudhuri, 90]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Set agreement
2 7 9
Processes start with private input values from a domain I (|I| ≥ n)
![Page 41: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/41.jpg)
The (n,k)-set agreement task [S. Chaudhuri, 90]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Set agreement
2 7 9
Their outputs must agree on at most k < n distinct values
7 7 2
![Page 42: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/42.jpg)
Impossibility of (3,2)-set agreement in the Iterated model
• 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 !!!
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 43: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/43.jpg)
Suppose a protocol exists
• Consider an input where processes have as input values their own ids
• Run the protocol until processes decide
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 44: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/44.jpg)
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
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 45: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/45.jpg)
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 !!!
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 46: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/46.jpg)
In summary
• The iterated model• Executions are represented as simplicial
complexes• Simple recursive structure
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 47: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/47.jpg)
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)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 48: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/48.jpg)
We can enrich the Iterated model with more powerful
objects
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 49: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/49.jpg)
The safe-consensus task
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 50: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/50.jpg)
The safe-consensus task[Afek, Gafni & Lieber, 09]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus
![Page 51: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/51.jpg)
The safe-consensus task[Afek, Gafni & Lieber, 09]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus
2 7 9
Processes start with private input values from a domain I
![Page 52: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/52.jpg)
The safe-consensus task[Afek, Gafni & Lieber, 09]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus
2 7 9
2 2 2
Their outputs values must be the same
![Page 53: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/53.jpg)
The safe-consensus task [Afek, Gafni & Lieber, 09]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus
2 7 9
The safe-consensus has two special rules
![Page 54: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/54.jpg)
The safe-consensus task [Afek, Gafni & Lieber, 09]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus
2 7 9
7
(1) If a process starts executing the task and outputs before any other process starts executing the task
![Page 55: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/55.jpg)
The safe-consensus task [Afek, Gafni & Lieber, 09]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus
2 7 9
7 7 7
the task’s output is that process proposed input value.
![Page 56: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/56.jpg)
The safe-consensus task [Afek, Gafni & Lieber, 09]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus
2 7 9
(2) Otherwise, if two or more processes initially access the task concurrently
![Page 57: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/57.jpg)
The safe-consensus task [Afek, Gafni & Lieber, 09]
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus
2 7 9
α α α
it can return any value.(even invalid values)
![Page 58: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/58.jpg)
What happens if we enrich the iterated model with safe-
consensus tasks ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 59: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/59.jpg)
The enriched Modelinit r := 0; sm, input, scret, dec := NULL;
loop foreverr := r + 1;SM[r].write(sm, scret);scret := safe-consensus[h(sm, scret)](id);sm := SM[r].snapshot();
/* Local computing */end loop
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 60: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/60.jpg)
The enriched Modelinit r := 0; sm, input, scret, dec := NULL;
loop foreverr := r + 1;SM[r].write(sm, scret);scret := safe-consensus[h(sm, scret)](id);sm := SM[r].snapshot();
/* Local computing */end loop
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Process access the object indicated by h(sm, scret)
![Page 61: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/61.jpg)
What happens to the protocol complex ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 62: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/62.jpg)
Protocol complex with safe-consensus
• 1 round• 3 processes• All processes invoke the
safe-consensus• Input values: Ids
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 63: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/63.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 64: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/64.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 65: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/65.jpg)
A closer look
• Which executions are represented in this complex ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 66: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/66.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 67: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/67.jpg)
A closer look
• Why do we have only these executions ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 68: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/68.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 69: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/69.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
Safe-consensus =
![Page 70: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/70.jpg)
A closer look
• Executions where the safe-consensus returns green
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 71: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/71.jpg)
A closer look
• Why there cannot be more adjacent simplexes ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 72: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/72.jpg)
A closer look
• Why there cannot be more adjacent simplexes ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 73: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/73.jpg)
A closer look
• Why there cannot be more adjacent simplexes ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 74: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/74.jpg)
A closer look
• Why there cannot be more adjacent simplexes ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
Safe-consensus =
![Page 75: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/75.jpg)
A closer look
• Why there cannot be more adjacent simplexes ?
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
Safe-consensus = Safe-consensus =
![Page 76: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/76.jpg)
A closer look
• Because the safe-consensus does not allow it
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus = Safe-consensus =
![Page 77: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/77.jpg)
A closer look
• Similar argument for other executions
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 78: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/78.jpg)
A closer look
• Similary for other executions
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 79: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/79.jpg)
A closer look
• Similary for other executions
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
Safe-consensus =
![Page 80: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/80.jpg)
A closer look
• Similary for other executions
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
Safe-consensus = Safe-consensus =
![Page 81: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/81.jpg)
A closer look
• Similary for other executions
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus = Safe-consensus =
![Page 82: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/82.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus =
![Page 83: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/83.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus =
![Page 84: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/84.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus =
![Page 85: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/85.jpg)
And the black complex
• It represents executions where the safe-consensus returns an invalid value
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 86: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/86.jpg)
And the black complex
• At least two processes invoke the safe-consensus concurrently
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 87: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/87.jpg)
And the black complex
• At least two processes invoke the safe-consensus concurrently
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 88: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/88.jpg)
A closer look
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
Safe-consensus = a value different from valid ids
![Page 89: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/89.jpg)
And again…
• Because we work in the iterated model• In the 2nd round• This behaviour is going to repeat
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 90: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/90.jpg)
Remember, Iterated model
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 91: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/91.jpg)
Remember, Iterated model
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 92: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/92.jpg)
Remember, Iterated model
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 93: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/93.jpg)
Some results for set agreement
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 94: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/94.jpg)
(k+1,k)-set agreement is solvable in this model
proc (k+1,k)-set-agreement(val)SM.write(val);sc := safe-consensus(id);sm := SM.snapshot();
if (sc is in {1, …, k+1} Λ sm[sc] ≠ NULL) thendec := sm[sc];elsedec := sm[j] with j := min{ m | sm[m] ≠ NULL };end if
decide dec;end proc
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 95: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/95.jpg)
Notice
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
• We omit here the correctness proof of the protocol
• Not difficult, but tedious
![Page 96: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/96.jpg)
In particular
(3,2)-set agreement is solvable in the iterated model with safe-consensus.
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 97: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/97.jpg)
In particular
(3,2)-set agreement is solvable in the iterated model with safe-consensus.
But we can prove that
(3,1)-set agreement (3-consensus) is not solvable in the Iterated model with safe-consensus.
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 98: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/98.jpg)
Proof’s idea• Suppose a protocol exists.• Consider an input where
processes propose their ids• Take the gray subcomplex
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 99: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/99.jpg)
In the protocol’s 1st round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 100: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/100.jpg)
In the protocol’s 1st round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 101: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/101.jpg)
In the protocol’s 1st round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
There exists a path here
![Page 102: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/102.jpg)
In the protocol’s 2nd round
• And because we work in an iterated model
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 103: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/103.jpg)
2nd round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 104: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/104.jpg)
2nd round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 105: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/105.jpg)
2nd round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 106: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/106.jpg)
2nd round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 107: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/107.jpg)
2nd round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
WRSCRD
WRSCRD
WRSCRD
![Page 108: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/108.jpg)
2nd round
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
There’s also a path
…And so on…
![Page 109: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/109.jpg)
Because of the iterated model
• In any r-round partial execution:– a solo execution of – is “conected” to a execution of and
without
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 110: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/110.jpg)
When the protocol finishes
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
must decide green
![Page 111: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/111.jpg)
When the protocol finishes
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
must decide red or yellow
must decide green
![Page 112: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/112.jpg)
Contradiction
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
This “connectivity” in all rounds lead us to a
contradiction, so no such protocol can exists
![Page 113: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/113.jpg)
In general
There is no protocol in the Iterated Snapshot model with safe-consensus objects that can solve the (k, 1)-set agreement problem (k ≥ 3).
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 114: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/114.jpg)
Summary
• There’s a deep conection between Distributed computing and Topology
• Impossibility results arise from this conection• We can derive algorithms by looking at the
geometric structure of protocol complexes• Shared objects can affect the topology of the
protocol complex (safe-consensus)
15/01/2010 Rodolfo Conde and Sergio Rajsbaum
![Page 115: The iterated shared memory model of computation and an enrichment with safe-consensus tasks](https://reader033.vdocument.in/reader033/viewer/2022042901/56815024550346895dbe0bc5/html5/thumbnails/115.jpg)
Thank you
15/01/2010 Rodolfo Conde and Sergio Rajsbaum