the iterated shared memory model of computation and an enrichment with safe-consensus tasks

115
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

Upload: milt

Post on 19-Mar-2016

40 views

Category:

Documents


1 download

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 Presentation

TRANSCRIPT

Page 1: The iterated shared memory model of computation and an enrichment with safe-consensus tasks

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thank you

15/01/2010 Rodolfo Conde and Sergio Rajsbaum