Distributed Computing through Topology an introduction Sergio - - PowerPoint PPT Presentation

distributed computing through topology an introduction
SMART_READER_LITE
LIVE PREVIEW

Distributed Computing through Topology an introduction Sergio - - PowerPoint PPT Presentation

Distributed Computing through Topology an introduction Sergio Rajsbaum Instituto de Matemticas UNAM From the book coauthored with Maurice Herlihy and Dmitry Kozlov to be published by Elsevier Sequential Computing Turing Machine


slide-1
SLIDE 1

an introduction

Sergio Rajsbaum Instituto de Matemáticas UNAM

From the book coauthored with Maurice Herlihy and Dmitry Kozlov to be published by Elsevier

Distributed Computing through Topology

slide-2
SLIDE 2

Sequential Computing

  • Turing Machine
  • model of

choice for theory of computation

  • provides a

precise definition of a "mechanical procedure"

The Imitation Game Turing Year 2012 centenary of his birth

slide-3
SLIDE 3

What about concurrency?

slide-4
SLIDE 4

Concurrency is everywhere

  • At a smaller scale, as processor feature

sizes shrink, they become harder to cool, manufacturers have given up trying to make processors faster. Instead, they have focused

  • n making processors more parallel.

Nearly every activity in our society works as a distributed system made up of human and sequential computer processes

slide-5
SLIDE 5

Very different from sequential computing

slide-6
SLIDE 6

This revolution requires a fundamental change in how programs are written. Need new principles, algorithms, and tools

  • The Art of Multiprocessor Programming

Herlihy & Shavit book

slide-7
SLIDE 7

Would not seem so according to traditional views

  • single-tape ≃ multi-tape

TM

  • interpreted as

sequential computing and distributed computing differ in questions of efficiency, but not computability.

  • The TM wikipedia page

mentions limitations: unbounded computation (OS) and concurrent processes starting others

slide-8
SLIDE 8

Why concurrency is different ?

Distributed systems are subject to failures and timing uncertainties, properties not captured by classical multi-tape models.

slide-9
SLIDE 9

Processes have partial information about the system state

  • Even if each process is more powerful than a

Turing machine

  • and abstracting away the communication

network (processes can directly talk to each

  • ther)
slide-10
SLIDE 10

Topology

Placing together all these views yields a simplicial complex “Frozen” representation all possible interleavings and failure scenarios into a single, static, simplicial complex

slide-11
SLIDE 11

Topology

views label vertices

  • f a simplex

Each simplex is an interleaving

slide-12
SLIDE 12

Topological invariants

  • ,

Preserved as computation unfolds Come from the nature of the faults and asynchrony in the system They determine what can be computed, and the complexity of the solutions

slide-13
SLIDE 13

Short History

Discovered in PODC 1988 when only 1 process may crash (dimension=1) by Biran, Moran and Zaks, after consensus FLP impossibility of PODS 1983 Generalized in 1993: Three STOC papers by Herlihy, Shavit, Borowski, Gafni, Saks, Zaharoughlu and dual approach by Eric Goubault in 1993! Distributed Computing through Combinatorial Topology, Herlihy, Kozlov, Rajsbaum, Elsevier 2014

slide-14
SLIDE 14

What would a theory of distributed computing be?

slide-15
SLIDE 15

Distributed systems...

  • Individual sequential processes
  • Cooperate to solve some problem
  • By message passing, shared memory, or any
  • ther mechanism
slide-16
SLIDE 16

Many kinds

  • Multicore, various shared-memory systems
  • Internet
  • Interplanetary internet
  • Wireless and mobile
  • cloud computing, etc.
slide-17
SLIDE 17

... and topology

  • ,

Combinatorial topology provides a common framework that unifies these models. Many models, appear to have little in common besides the common concern with complexity, failures and timing.

slide-18
SLIDE 18

Theory of distributed computing research

  • Models of distributed computing systems:

communication, timing, failures, which models are central?

  • Distributed Problems:
  • ne-shot task, long-lived tasks, verification, graph

problems, anonymous,…

  • Computability, complexity, decidability
  • Topological invariants:

(a) how are related to failures, asynchrony, communication, and (b) techniques to prove them

  • Simulations and reductions
slide-19
SLIDE 19

A “universal” distributed computing model

(a Turing Machine for DC)

slide-20
SLIDE 20

Ingredients of a model

  • processes
  • communication
  • failures
slide-21
SLIDE 21

Once we have a “universal” model, how to study it?

slide-22
SLIDE 22

multi-read/multi-writer single-reader/single-writer message passing t failures stronger objects failure detectors

slide-23
SLIDE 23

Iterated model multi-read/multi-writer single-reader/single-writer message passing t failures stronger objects failure detectors

generic techniques, simulations and reductions

slide-24
SLIDE 24

Iterated shared memory

( a Turing Machine for DC ? )

slide-25
SLIDE 25

n Processes

slide-26
SLIDE 26

asynchronous, wait-free

slide-27
SLIDE 27

Unbounded sequence of read/write shared arrays

slide-28
SLIDE 28
  • use each one
  • nce
  • in order
slide-29
SLIDE 29

write, then read

8

slide-30
SLIDE 30

8

8,-,-

slide-31
SLIDE 31

8

8,-,-

slide-32
SLIDE 32

8

8,-,-

3 4

slide-33
SLIDE 33

8

8,-,-

3 4

8,3,4 8,3,4

slide-34
SLIDE 34

8

8,-,-

3 4

8,3,4 8,3,4

slide-35
SLIDE 35

Asynchrony- solo run

  • ,2,-
  • ,4,-
  • ,1,-

2 4 1

slide-36
SLIDE 36

every copy is new

slide-37
SLIDE 37
  • arrive in

arbitrary order

  • last one sees

all

slide-38
SLIDE 38
  • arrive in

arbitrary order

  • last one sees

all 2

slide-39
SLIDE 39
  • arrive in

arbitrary order

  • last one sees

all 2

  • ,2,-
slide-40
SLIDE 40
  • arrive in

arbitrary order

  • last one sees

all 2

  • ,2,3

3

slide-41
SLIDE 41
  • arrive in

arbitrary order

  • last one sees

all 2

1,2,3

3 1

slide-42
SLIDE 42
  • arrive in

arbitrary order

  • last one sees

all 2

1,2,3

3 1 returns 1,2,3

slide-43
SLIDE 43
  • remaining 2 go

to next memory 2 3 1

slide-44
SLIDE 44
  • remaining 2 go

to next memory 2 3 1 2

  • ,2,-
slide-45
SLIDE 45
  • 3rd one

returns -,2,3 2 3 1 2

  • ,2,3

3

slide-46
SLIDE 46
  • 2nd one goes

alone 2 3 1 2 3

slide-47
SLIDE 47
  • returns -,2,-

2 3 1 2 3 2 d

  • ,2,-
slide-48
SLIDE 48

so in this run, the views are

  • ,2,3

1,2,3

  • ,2,-
slide-49
SLIDE 49

another run

slide-50
SLIDE 50
  • arrive in

arbitrary order 2 3 1

slide-51
SLIDE 51
  • all see all

2

1,2,3

3 1

slide-52
SLIDE 52

View graph

slide-53
SLIDE 53

indistinguishability

  • The most essential

distributed computing issue is that a process has only a local perspective of the world

  • Represent with a vertex

labeled with id (green) and a local state this perspective

  • E.g., its input is 0
  • Process does not know

if another process has input 0 or 1, a graph

1

??

slide-54
SLIDE 54

Indistinguishability graph for 2 processes

slide-55
SLIDE 55
  • focus on 2

processes

  • there may be

more that arrive after 2

slide-56
SLIDE 56

sees only itself 2

  • ,2,-
slide-57
SLIDE 57
  • green sees both
  • but ...

2

  • ,2,3

3

  • ,2,-
slide-58
SLIDE 58

2

  • ,2,3

3

  • ,2,-
  • ,2,3

??

  • green sees both
  • but, doesn't

know if seen by the other

slide-59
SLIDE 59

see each other see each other

  • ne round graph for 2

processes

solo solo

slide-60
SLIDE 60

iterated runs

round 2: round 1: for each run in round 1 there are the same 3 runs in the next round

slide-61
SLIDE 61

iterated runs

solo sees both solo in both rounds round 2:

slide-62
SLIDE 62

iterated runs

solo sees both round 2: sees both, then solo in 2nd

slide-63
SLIDE 63

iterated runs

round 1: round 2: see each other in 1st round see each other in both

slide-64
SLIDE 64

More rounds

round 1: round 2: round 3:

Topological invariant: protocol graph after k rounds

  • longer
  • but always connected
slide-65
SLIDE 65

Wait-free theorem for 2 processes

For any protocol in the iterated model, its graph after k rounds is

  • longer
  • but always connected
slide-66
SLIDE 66

Iterated approach: theorem holds in other models

  • Via known, generic simulation
  • Instead of ad hoc proofs (some known) for each

case

easy iterated proof : local, iterate any number of processes any number of processes, any number of failures message passing non-iterated model

slide-67
SLIDE 67

implications in terms of

  • solvability
  • complexity
  • computability
slide-68
SLIDE 68

Distributed problems

binary consensus

1 1 1 1

start with same input decide same output

Input Graph Output Graph

different inputs, agree on any

Input/output relation

slide-69
SLIDE 69

Binary consensus is not solvable due to connectivity

1 1 1 1 Input Graph Output Graph Input/output relation

Each edge is an initial configuration of the protocol subdivided after 1 round no solution in 1 round

decide decide

no solution in k rounds

slide-70
SLIDE 70

corollaries:

consensus impossible in the iterated model

slide-71
SLIDE 71

consensus impossibility holds in other models

  • Via known, generic simulation
  • Instead of ad hoc proofs for each case

2 process binary iterated any number of processes any number of processes, any number of failures message passing non-iterated model

slide-72
SLIDE 72

Decidability

  • Given a task for 2 processes, is it solvable in the iterated

model?

  • Yes, there is an algorithm to decide: a graph connectivity

problem

  • Then extend result to other models , via generic

simulations, instead of ad hoc proofs

slide-73
SLIDE 73

Beyond 2 processes

from 1-dimensional graphs to n-dimensional complexes

slide-74
SLIDE 74

2-dim simplex

  • three local states in

some execution

  • 2-dimensional simplex
  • e.g. inputs 0,1,2

1 2

slide-75
SLIDE 75

3-dim simplex

  • 4 local states in some

execution

  • 3-dim simplex
  • e.g. inputs 0,1,2,3

1 2 3

slide-76
SLIDE 76

complexes

Collection of simplexes closed under containment

slide-77
SLIDE 77

consensus task

3 processes

Input Complex 1 1 1 1 1 Output Complex

slide-78
SLIDE 78

Iterated model

One initial state

slide-79
SLIDE 79

Iterated model

after 1 round all see each other

slide-80
SLIDE 80

Iterated model

after 1 round 2 don’t know if

  • ther saw them
slide-81
SLIDE 81

Iterated model

after 1 round 1 doesn't know if 2 other saw it

slide-82
SLIDE 82

Wait-free theorem for n processes

For any protocol in the iterated model, its complex after k rounds is

  • a chromatic subdivision of the input

complex

slide-83
SLIDE 83

General wait-free iterated solvability theorem

A task is solvable if and only if the input complex can be chromatically subdivided and mapped into the output complex continuously respecting colors and the task specification

slide-84
SLIDE 84

Decidability

  • Given a task for 3 processes, is it solvable in the iterated

model?

  • No! there are tasks that are solvable if and only if a loop

is contractible in a 2-dimensional complex

  • Then extend result to other models, via generic

simulations, instead of ad hoc proofs

slide-85
SLIDE 85

Extension to other models

  • Via known, generic simulation
  • Instead of ad hoc proofs for each case

3 process 2-agreem iterated any number of processes any number of processes, 2 or more failures message passing non-iterated model

slide-86
SLIDE 86

Conclusions

  • In distributed computing there are too

many different issues of interest, no single model can capture them all

slide-87
SLIDE 87

Synchronous protocol complex evolution

Connected but not 1-connected

D

slide-88
SLIDE 88

Conclusions

  • But the iterated model (with extensions

not discussed here) captures essential distributed computing aspects

  • and topology is the essential feature for

computability and complexity results

slide-89
SLIDE 89

END