the iterated shared memory model of computation and an enrichment with safe consensus tasks n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
The iterated shared memory model of computation and an enrichment with safe-consensus tasks PowerPoint Presentation
Download Presentation
The iterated shared memory model of computation and an enrichment with safe-consensus tasks

Loading in 2 Seconds...

play fullscreen
1 / 115

The iterated shared memory model of computation and an enrichment with safe-consensus tasks - PowerPoint PPT Presentation


  • 131 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'The iterated shared memory model of computation and an enrichment with safe-consensus tasks' - milt


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
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 Conde

Joint work with Sergio Rajsbaum

Instituto de Matemáticas

Universidad Nacional Autónoma de México

GETCO 2010

the model

The Model

Rodolfo Conde and Sergio Rajsbaum

the iterated snapshot shared memory model
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

the iterated snapshot shared memory model1
TheIteratedSnapshotSharedMemorymodel
  • The computation proceeds in rounds

Rodolfo Conde and Sergio Rajsbaum

the iterated snapshot shared memory model2
TheIteratedSnapshotSharedMemorymodel
  • In each round, a process P can atomically write to SM[i][P]

0

1

1

Rodolfo Conde and Sergio Rajsbaum

the iterated snapshot shared memory model3
TheIteratedSnapshotSharedMemorymodel
  • each process can atomically read all of SM[i]

0

1

1

Rodolfo Conde and Sergio Rajsbaum

the iterated snapshot shared memory model4
TheIteratedSnapshotSharedMemorymodel
  • In each round, the processes use a new memory array

0

0

1

1

0

1

Rodolfo Conde and Sergio Rajsbaum

asynchronous
Asynchronous
  • The n processes are asynchronous
    • Arbitrary delays of any kind

Rodolfo Conde and Sergio Rajsbaum

wait free
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
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 protocol1
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 protocol2
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
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 protocol1
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 protocol2
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 protocol3
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 protocol4
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 protocol5
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 protocol6
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
Protocol complex (1 round)

1

01

01

0

Rodolfo Conde and Sergio Rajsbaum

the 2nd round
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 round1
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 round2
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 round3
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
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
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 protocols1
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
Protocol complex (1st round)

Rodolfo Conde and Sergio Rajsbaum

protocol complex 1st round1
Protocol complex (1st round)

WR

RD

WR

RD

WR

RD

0

0

0

Rodolfo Conde and Sergio Rajsbaum

protocol complex 1st round2
Protocol complex (1st round)

WR

RD

WR

RD

WR

RD

0

0

0

Rodolfo Conde and Sergio Rajsbaum

protocol complex 1st round3
Protocol complex (1st round)

WR

RD

WR

RD

WR

RD

0

0

0

Rodolfo Conde and Sergio Rajsbaum

protocol complex 1st round4
Protocol complex (1st round)

WR

RD

WR

RD

WR

RD

0

0

0

Rodolfo Conde and Sergio Rajsbaum

protocol complex 3 processes
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
Rercursive behaviour (2nd round)

Rodolfo Conde and Sergio Rajsbaum

rercursive behaviour 2nd round1
Rercursive behaviour (2nd round)

Rodolfo Conde and Sergio Rajsbaum

rercursive behaviour 2nd round2
Rercursive behaviour (2nd round)

Rodolfo Conde and Sergio Rajsbaum

protocol complex 2nd round
Protocol complex (2nd round)

Rodolfo Conde and Sergio Rajsbaum

in general
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
The (n,k)-set agreement task[S. Chaudhuri, 90]

Set agreement

Rodolfo Conde and Sergio Rajsbaum

the n k set agreement task s chaudhuri 901
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 902
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 the iterated model
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
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 exists1
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
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
In summary
  • The iterated model
  • Executions are represented as simplicial complexes
  • Simple recursive structure

Rodolfo Conde and Sergio Rajsbaum

in summary1
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

the safe consensus task

The safe-consensus task

Rodolfo Conde and Sergio Rajsbaum

the safe consensus task afek gafni lieber 09
The safe-consensus task[Afek, Gafni & Lieber, 09]

Safe-consensus

Rodolfo Conde and Sergio Rajsbaum

the safe consensus task afek gafni lieber 091
The safe-consensus task[Afek, Gafni & Lieber, 09]

2

7

9

Processes start with private input values from a domain I

Safe-consensus

Rodolfo Conde and Sergio Rajsbaum

the safe consensus task afek gafni lieber 092
The safe-consensus task[Afek, Gafni & Lieber, 09]

2

7

9

2

2

2

Their outputs values must be the same

Safe-consensus

Rodolfo Conde and Sergio Rajsbaum

the safe consensus task afek gafni lieber 093
The safe-consensus task [Afek, Gafni & Lieber, 09]

2

7

9

The safe-consensus has two special rules

Safe-consensus

Rodolfo Conde and Sergio Rajsbaum

the safe consensus task afek gafni lieber 094
The safe-consensus task [Afek, Gafni & Lieber, 09]

2

7

9

7

(1) If a process starts executing the task and outputs before any other process starts executing the task

Safe-consensus

Rodolfo Conde and Sergio Rajsbaum

the safe consensus task afek gafni lieber 095
The safe-consensus task [Afek, Gafni & Lieber, 09]

2

7

9

7

7

7

the task’s output is that process proposed input value.

Safe-consensus

Rodolfo Conde and Sergio Rajsbaum

the safe consensus task afek gafni lieber 096
The safe-consensus task [Afek, Gafni & Lieber, 09]

2

7

9

(2) Otherwise, if two or more processes initially access the task concurrently

Safe-consensus

Rodolfo Conde and Sergio Rajsbaum

the safe consensus task afek gafni lieber 097
The safe-consensus task [Afek, Gafni & Lieber, 09]

2

7

9

α

α

α

it can return any value.

(even invalid values)

Safe-consensus

Rodolfo Conde and Sergio Rajsbaum

what happens if we enrich the iterated model with safe consensus tasks

What happens if we enrich the iterated model with safe-consensus tasks ?

Rodolfo Conde and Sergio Rajsbaum

the enriched model
The enriched Model

init r := 0; sm, input, scret, dec := NULL;

loopforever

r := r + 1;

SM[r].write(sm, scret);

scret := safe-consensus[h(sm, scret)](id);

sm := SM[r].snapshot();

/* Local computing */

endloop

Rodolfo Conde and Sergio Rajsbaum

the enriched model1
The enriched Model

init r := 0; sm, input, scret, dec := NULL;

loopforever

r := r + 1;

SM[r].write(sm, scret);

scret := safe-consensus[h(sm, scret)](id);

sm := SM[r].snapshot();

/* Local computing */

endloop

Processaccesstheobject

indicatedbyh(sm, scret)

Rodolfo Conde and Sergio Rajsbaum

what happens to the protocol complex

What happens to the protocol complex ?

Rodolfo Conde and Sergio Rajsbaum

protocol complex with safe consensus
Protocolcomplexwithsafe-consensus
  • 1 round
  • 3 processes
  • All processes invoke the safe-consensus
  • Input values: Ids

Rodolfo Conde and Sergio Rajsbaum

a closer look
A closer look

Rodolfo Conde and Sergio Rajsbaum

a closer look1
A closer look

Rodolfo Conde and Sergio Rajsbaum

a closer look2
A closer look
  • Which executions are represented in this complex ?

Rodolfo Conde and Sergio Rajsbaum

a closer look3
A closer look

Rodolfo Conde and Sergio Rajsbaum

a closer look4
A closer look
  • Why do we have only these executions ?

Rodolfo Conde and Sergio Rajsbaum

a closer look5
A closer look

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

a closer look6
A closer look

WR

SC

RD

WR

SC

RD

WR

SC

RD

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look7
A closer look
  • Executions where the safe-consensus returns green

Rodolfo Conde and Sergio Rajsbaum

a closer look8
A closer look
  • Why there cannot be more adjacent simplexes ?

Rodolfo Conde and Sergio Rajsbaum

a closer look9
A closer look
  • Why there cannot be more adjacent simplexes ?

Rodolfo Conde and Sergio Rajsbaum

a closer look10
A closer look
  • Why there cannot be more adjacent simplexes ?

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

a closer look11
A closer look
  • Why there cannot be more adjacent simplexes ?

WR

SC

RD

WR

SC

RD

WR

SC

RD

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look12
A closer look
  • Why there cannot be more adjacent simplexes ?

WR

SC

RD

WR

SC

RD

WR

SC

RD

Safe-consensus =

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look13
A closer look
  • Because the safe-consensus does not allow it

Safe-consensus =

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look14
A closer look
  • Similar argument for other executions

Rodolfo Conde and Sergio Rajsbaum

a closer look15
A closer look
  • Similary for other executions

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

a closer look16
A closer look
  • Similary for other executions

WR

SC

RD

WR

SC

RD

WR

SC

RD

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look17
A closer look
  • Similary for other executions

WR

SC

RD

WR

SC

RD

WR

SC

RD

Safe-consensus =

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look18
A closer look
  • Similary for other executions

Safe-consensus =

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look19
A closer look

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look20
A closer look

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

a closer look21
A closer look

Safe-consensus =

Rodolfo Conde and Sergio Rajsbaum

and the black complex
And the black complex
  • It represents executions where the safe-consensus returns an invalid value

Rodolfo Conde and Sergio Rajsbaum

and the black complex1
And the black complex
  • At least two processes invoke the safe-consensus concurrently

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

and the black complex2
And the black complex
  • At least two processes invoke the safe-consensus concurrently

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

a closer look22
A closer look

Safe-consensus= a valuedifferentfromvalidids

Rodolfo Conde and Sergio Rajsbaum

and again
And again…
  • Because we work in the iterated model
  • In the 2nd round
  • This behaviour is going to repeat

Rodolfo Conde and Sergio Rajsbaum

remember iterated model
Remember, Iterated model

Rodolfo Conde and Sergio Rajsbaum

remember iterated model1
Remember, Iterated model

Rodolfo Conde and Sergio Rajsbaum

remember iterated model2
Remember, Iterated model

Rodolfo Conde and Sergio Rajsbaum

some results for set agreement

Some results for set agreement

Rodolfo Conde and Sergio Rajsbaum

k 1 k set agreement is solvable in this model
(k+1,k)-set agreementissolvable in thismodel

proc (k+1,k)-set-agreement(val)

SM.write(val);

sc := safe-consensus(id);

sm := SM.snapshot();

if (scis in {1, …, k+1} Λsm[sc] ≠ NULL) then

dec := sm[sc];

else

dec := sm[j] with j := min{ m | sm[m] ≠ NULL };

endif

decide dec;

endproc

Rodolfo Conde and Sergio Rajsbaum

notice
Notice
  • We omit here the correctness proof of the protocol
  • Not difficult, but tedious

Rodolfo Conde and Sergio Rajsbaum

in particular
In particular

(3,2)-set agreement is solvable in the iterated model with safe-consensus.

Rodolfo Conde and Sergio Rajsbaum

in particular1
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.

Rodolfo Conde and Sergio Rajsbaum

proof s idea
Proof’s idea
  • Suppose a protocol exists.
  • Consider an input where processes propose their ids
  • Take the gray subcomplex

Rodolfo Conde and Sergio Rajsbaum

in the protocol s 1st round
In the protocol’s 1st round

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

in the protocol s 1st round1
In the protocol’s 1st round

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

in the protocol s 1st round2
In the protocol’s 1st round

Thereexists a pathhere

Rodolfo Conde and Sergio Rajsbaum

in the protocol s 2nd round
In the protocol’s 2nd round
  • And because we work in an iterated model

Rodolfo Conde and Sergio Rajsbaum

2nd round
2nd round

Rodolfo Conde and Sergio Rajsbaum

2nd round1
2nd round

Rodolfo Conde and Sergio Rajsbaum

2nd round2
2nd round

Rodolfo Conde and Sergio Rajsbaum

2nd round3
2nd round

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

2nd round4
2nd round

WR

SC

RD

WR

SC

RD

WR

SC

RD

Rodolfo Conde and Sergio Rajsbaum

2nd round5
2nd round

There’salso a path

And so on…

Rodolfo Conde and Sergio Rajsbaum

because of the iterated model
Because of the iterated model
  • In any r-round partial execution:
    • a solo execution of
    • is “conected” to a execution of and without

Rodolfo Conde and Sergio Rajsbaum

when the protocol finishes
When the protocol finishes

must decide green

Rodolfo Conde and Sergio Rajsbaum

when the protocol finishes1
When the protocol finishes

must decide green

must decide redoryellow

Rodolfo Conde and Sergio Rajsbaum

contradiction
Contradiction

This “connectivity” in all rounds lead usto a contradiction, so no suchprotocol can exists

Rodolfo Conde and Sergio Rajsbaum

in general1

In general

Thereis no protocol in theIteratedSnapshotmodelwithsafe-consensusobjectsthat can solvethe (k, 1)-set agreementproblem (k ≥ 3).

Rodolfo Conde and Sergio Rajsbaum

summary
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)

Rodolfo Conde and Sergio Rajsbaum

thank you

Thank you

Rodolfo Conde and Sergio Rajsbaum