Top Banner
Sergio Rajsbaum Instituto de Matemáticas UNAM From the book coauthored with Maurice Herlihy and Dmitry Kozlov to be published by Elsevier Computability in distributed computing
258

Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Jun 06, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Sergio RajsbaumInstituto de Matemáticas

UNAM

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

Computability in distributed computing

Page 2: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

an introduction

Sergio RajsbaumInstituto de Matemáticas

UNAM

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

Computability in distributed computing

Page 3: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Distributed computability has a topological nature

Discovered in 1993: Herlihy, Shavit, Borowski, Gafni, Saks, Zaharoughlu Further developed by Attiya, Castaneda, Kouznetsov,

Raynal, Travers, Corentin, etc. Work from semantics community Eric Goubault, M.

Raussen, and others

Page 4: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Two stories about love

Page 5: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Two stories about loveUsing topology

Page 6: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The stories

• Cheating wives

(A.k.a. muddy children, from knowledge theory)

• Two insecure lovers

(A.k.a. Coordinated attack, from databases and networking)

Page 7: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Cheating wivesFirst story

Page 8: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Cheating wives

Page 9: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Cheating wivesThere were one million married couples.

Page 10: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Cheating wivesThere were one million married couples.

40 wives were unfaithful

Page 11: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Cheating wivesThere were one million married couples.

40 wives were unfaithful

Each husband knew whether other men's wives were unfaithful but he did now know whether his wife was unfaithful.

Page 12: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Cheating wivesThere were one million married couples.

40 wives were unfaithful

Each husband knew whether other men's wives were unfaithful but he did now know whether his wife was unfaithful.

The King of the country announced “There is at least one unfaithful wife” and publicized the following decree

Page 13: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Cheating wives decree

He asks the following question over and over:

can you tell for sure whether or not you are a cuckold?

Page 14: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Cheating wives decree

He asks the following question over and over:

can you tell for sure whether or not you are a cuckold?

Assuming that all of the men are intelligent, honest, and answer simultaneously, what will happen?

Page 15: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Analysis of the puzzle

First operational, then combinatorial

Page 16: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)First, suppose that exactly one is cuckold

Page 17: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)First, suppose that exactly one is cuckold

He sees nobody else, can conclude that he is the one

Page 18: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)First, suppose that exactly one is cuckold

He sees nobody else, can conclude that he is the one

The others cannot tell whether or not they are cuckolds

Page 19: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)First, suppose that exactly one is cuckold

He sees nobody else, can conclude that he is the one

The others cannot tell whether or not they are cuckolds

At the first question, exactly one says “yes”

Page 20: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)First, suppose that exactly one is cuckold

He sees nobody else, can conclude that he is the one

The others cannot tell whether or not they are cuckolds

At the first question, exactly one says “yes”

At the second, all others say “no”

Page 21: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)Now, suppose that exactly two are cuckolds

Page 22: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)Now, suppose that exactly two are cuckolds

They know at least two are cuckolds, because nobody spoke in first round

Page 23: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)Now, suppose that exactly two are cuckolds

They know at least two are cuckolds, because nobody spoke in first round

They see only one cuckold

Page 24: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)Now, suppose that exactly two are cuckolds

They know at least two are cuckolds, because nobody spoke in first round

They see only one cuckold

At the second question, exactly two says “yes”

Page 25: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)Now, suppose that exactly two are cuckolds

They know at least two are cuckolds, because nobody spoke in first round

They see only one cuckold

At the second question, exactly two says “yes”

At the third, all others say “no”

Page 26: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (3)

Suppose that exactly k are cuckolds, by induction...

Page 27: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (3)

Suppose that exactly k are cuckolds, by induction...

At the k-th question, exactly k say “yes”

Page 28: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (3)

Suppose that exactly k are cuckolds, by induction...

At the k-th question, exactly k say “yes”

At the (k+1)-th, all others say “no”

Page 29: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Combinatorial analysis

Local states

Page 30: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Combinatorial analysis

A local state is a man’s state of knowledge

Local states

Page 31: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Combinatorial analysis

A local state is a man’s state of knowledge

It is represented by a vector: in position i has 0 if man i is known to be clean, and 1 if cuckold

Local states

Page 32: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Combinatorial analysis

A local state is a man’s state of knowledge

It is represented by a vector: in position i has 0 if man i is known to be clean, and 1 if cuckold

Because man i does not know its own status, its input vector has ⊥ in position i

Local states

Page 33: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

12 3

Global inputs

Each possible input configuration is represented as a simplex, linking compatible states for the men

meaning that the men can be in these states together

Page 34: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

12 3

Global inputs

Each possible input configuration is represented as a simplex, linking compatible states for the men

meaning that the men can be in these states together

-0100-0-1

Page 35: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

all cleanall clean

00" 0" 0"00

0"1 01"

"00

"01 "1 0

"11

1" 010"

all dirty

"111"1 11"

all dirty

12 3 Initial Complex

man 3 cuckold

men 1,3 cuckold

all cuckolds

no cuckolds

Page 36: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

all cleanall clean

00" 0" 0"00

0"1 01"

"00

"01 "1 0

"11

1" 010"

all dirty

"111"1 11"

all dirty

Man 1 knows that man 2 is clean and man 3

is cuckold

12 3 Initial Complexno cuckolds

all cuckolds

Page 37: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

all cleanall clean

00" 0" 0"00

0"1 01"

"00

"01 "1 0

"11

1" 010"

all dirty

"111"1 11"

all dirty

he may be clean...

12 3 Initial Complexno cuckolds

all cuckolds

Page 38: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

all cleanall clean

00" 0" 0"00

0"1 01"

"00

"01 "1 0

"11

1" 010"

all dirty

"111"1 11"

all dirty

...or he may be cuckold

12 3 Initial Complexno cuckolds

all cuckolds

Page 39: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

all cleanall clean

00" 0" 0"00

0"1 01"

"00

"01 "1 0

"11

1" 010"

all dirty

"111"1 11"

all dirty

12 3 Initial Complexdisappears when

announced “at least one cuckold”

that is, men know that each 2-simplex is a possible initial state, except for the one where all are clean

no cuckolds

all cuckolds

Page 40: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Evolution12 3

12:01 PM11:59 AM

1:01 PM 2:01 PM

Page 41: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

EvolutionBefore mother’s announcement

12 3

12:01 PM11:59 AM

1:01 PM 2:01 PM

Page 42: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Evolution12 3

12:01 PM11:59 AM

1:01 PM 2:01 PM

3 vertexes exposed, where someone knows its status

Page 43: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Evolution12 3

12:01 PM11:59 AM

1:01 PM 2:01 PM

Nobody spoke previous round, 6 vertexes exposed

Page 44: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Evolution12 3

12:01 PM11:59 AM

1:01 PM 2:01 PM

All 3 announce “cuckolds”

Page 45: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Evolution12 3

12:01 PM11:59 AM

1:01 PM 2:01 PM

Page 46: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Decisions

12:01 PM11:59 AM

1:01 PM 2:01 PM

12 3

Page 47: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Decisions

12:01 PM11:59 AM

1:01 PM 2:01 PM

12 3

No decisions

Page 48: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Decisions

12:01 PM11:59 AM

1:01 PM 2:01 PM

3 vertexes labeled, “cuckold”

12 3

Page 49: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Decisions

12:01 PM11:59 AM

1:01 PM 2:01 PM

Nobody spoke previous round, 6 vertexes labeled “cuckold”

12 3

Page 50: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Decisions

12:01 PM11:59 AM

1:01 PM 2:01 PM

3 vertexes labeled “cuckold”

12 3

Page 51: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Decisions

12:01 PM11:59 AM

1:01 PM 2:01 PM

12 3

Page 52: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Output complex

Each man should say “yes” or “no” All combinations are possible...

Decisions induce a map to this complex

Page 53: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Output complex

Each man should say “yes” or “no” All combinations are possible...

... except all “no” after King’s announcement

Decisions induce a map to this complex

Page 54: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Solving the cheating wives task

Decisions define a simplicial map from input complex to output complex that respects the task’s specification

Each man decides an output value, on one of its local states

In this task communication is very limited. More generally, for any task...

Page 55: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Solving any task

A task is solvable if and only if there exists a subdivision of the input complex and a simplicial map to the output complex that respects the task’s specification

Herlihy, Shavit 1993

In the basic, wait-free model

Wait-free: asynchronous model where any number of processes can crash

Page 56: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Two insecure loversSecond story

Page 57: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Coordination

We often need to ensure that two things happen together or not at all.

For example, a banking system needs to ensure that if an automatic teller dispenses cash, then the corresponding account balance is debited, and vice-versa.

Page 58: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Two insecure lovers

Page 59: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Two insecure lovers

• Alice and Bob want to schedule a meeting.

Page 60: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Two insecure lovers

• Alice and Bob want to schedule a meeting.

• If both attend, they win, but if only one attends, defeat and humiliation is felt.

Page 61: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Two insecure lovers

• Alice and Bob want to schedule a meeting.

• If both attend, they win, but if only one attends, defeat and humiliation is felt.

• As a result, neither will show up without a guarantee that the other will show up at the same time.

Page 62: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Two insecure lovers

• Alice and Bob want to schedule a meeting.

• If both attend, they win, but if only one attends, defeat and humiliation is felt.

• As a result, neither will show up without a guarantee that the other will show up at the same time.

• Communication is be SMS only.

Page 63: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Communication problems

• Normally, it takes a message one hour to arrive.

• However, it is possible that it is gets lost.

Page 64: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The puzzle

How long will it take Alice and Bob to coordinate their meeting?

Fortunately, on this particular night, all the messages arrive safely.

Page 65: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Analysis of the puzzle

First operational, then combinatorial

Page 66: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)

Suppose Alice initiates the communication

Page 67: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)

Page 68: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)

Suppose Bob receives a message at 1:00 from Alice saying “meet at midnight”. Should Bob show up?

Page 69: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)

Suppose Bob receives a message at 1:00 from Alice saying “meet at midnight”. Should Bob show up?

Although her message was in fact delivered, Alice does not know. She therefore considers it possible that Bob did not receive the message.

Page 70: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)

Suppose Bob receives a message at 1:00 from Alice saying “meet at midnight”. Should Bob show up?

Although her message was in fact delivered, Alice does not know. She therefore considers it possible that Bob did not receive the message.

Hence Alice cannot decide to show up, given her current state of knowledge.

Page 71: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (1)

Suppose Bob receives a message at 1:00 from Alice saying “meet at midnight”. Should Bob show up?

Although her message was in fact delivered, Alice does not know. She therefore considers it possible that Bob did not receive the message.

Hence Alice cannot decide to show up, given her current state of knowledge.

Knowing this, Bob will not show up based solely on Alice’s message.

Page 72: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)

Page 73: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)

Naturally, Bob reacts by sending an acknowledgment back to Alice, which arrives at 2:00

Page 74: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)

Naturally, Bob reacts by sending an acknowledgment back to Alice, which arrives at 2:00

Will Alice plan to show up?

Page 75: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Operational analysis (2)

Naturally, Bob reacts by sending an acknowledgment back to Alice, which arrives at 2:00

Will Alice plan to show up?

Unfortunately, Alice’s predicament is similar to Bob’s predicament at 1:00, she cannot yet decide to show up

Page 76: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The key insight is that the difficulty is not caused by what actually happens (all messages actually arrive) but by the uncertainty regarding what might have happened.

No number of successfully delivered acknowledgments will be enough to ensure that show up safely!

Page 77: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Combinatorial analysis

Page 78: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Combinatorial analysis

Initially Alice has two possible decisions: meet at dawn, or meet at noon the next day.

Page 79: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Combinatorial analysis

Initially Alice has two possible decisions: meet at dawn, or meet at noon the next day.

Bob has only one initial state, the white vertex in the middle, waiting to hear Alice’s preference.

Page 80: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Combinatorial analysis

Initially Alice has two possible decisions: meet at dawn, or meet at noon the next day.

Bob has only one initial state, the white vertex in the middle, waiting to hear Alice’s preference.

This vertex belongs to two edges (simplexes)

Page 81: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Evolution

Attack at dawn! Attack at noon!

noon

delivered deliveredlost1:00 PM

delivered deliveredlost

delivered deliveredlost lost2:00 PM

meet at noonmeet at dawn

Page 82: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Topology implies impossibility

No number of successfully delivered acknowledgments will be enough to ensure that show up safely, because the complex is subdivided, and remains connected!

Page 83: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

No number of successfully delivered acknowledgments will be enough to ensure that show up safely!

Page 84: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Because not possible to map a connected input complex into a disconnected output complex

Page 85: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,
Distributed Computing
Page 86: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Three epochs of computing (1)In the beginning there was sequential computing

• The model of choice for theory of computation–Turing machine

• provides a precise definition of a “mechanical procedure”

• Turing Year 2012 birth centenary

• STOC, and Symposium on Switching and AutomataTheory (1966), today FOCS

Page 87: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Three epochs of computing (2)Then there was parallel computing

• Model of choice– PRAM

• Several processes computing in parallel

• All executing computation steps synchronously

• No process and no communication failures

• Symp. Parallel Algor. and Architectures, SPAA (1989)

• In 2007 Kanbalam put UNAM at number 28 amonguniversities, 1,368 processors at a cost of 3 million dollars

Page 88: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Three epochs of computing (2)

Parallel computing

• No challenge to precise definition of “mechanicalprocedure”

• Wikipedia: TM equivalent to multi-tape Turing machine,is usually interpreted as:

• sequential computing and parallel computing differ inquestions of efficiency, but not computability.

Page 89: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Three epochs of computing (3)

Distributed computing is everywhere!

• Nearly every activity in our society works as a distributedsystem made up of human and computer processes

• “This revolution requires a fundamental change in howprograms are written. Need new principles, algorithms,and tools” [Herlihy Shavit book]

• Challenge to precise definition of “mechanical procedure”

Page 90: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Why is distributed computingdifferent?

A system observed by several monitors

• Does a system satisfy a certain property φ ?

• Property φ is typically expressed in a linear temporal logics

Page 91: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Failure free ∼ parallel

• Monitors can exchange their obser-vations and agree on the state of the system, to evaluate φ

Distributed system being monitored

• Techniques such as augmenting events with vector-clockinformation, Chandy-Lamport snapshots

Page 92: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Distributed computing

• Monitors may fail by undetectable crashes

• Asynchronous communication- unpredictable delays

Page 93: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The science of perspectives

• Each monitor has its own perspective of the global stateof the system

Page 94: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The science of perspectives

• Nobody can observe the global state

XVIII c.

One’s subjective experience can be true, but such experience is inherently limited by its failure to account for other

truths or a totality of truth.

Page 95: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The science of perspectives

• Is there a global state??

Page 96: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The science of perspectives

Multiperspectivism in literature, movies, etc.

(Roshomon, Kurosawa)

• A mode of storytelling in which multiple viewpoints areemployed for the presentation of a story

• To draw attention to various kinds of differences andsimilarities between the points of view presented therein.

the only authentic approach to the problem of reality is one which allows multiple perspectives to be heard in

debate with each other (Schonfield)

Page 97: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The science of perspectives

In distributed computing we study how perspectives evolvewith time, as unreliable communication takes place.

• And we know by talking we may get closer to each other:approximate agreement [DLPSW86]

• but never get there: consensus is impossible (even if onlyone process can crash, asynchronous) [FLP85]

Page 98: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

The science of perspectives

Why can’t we agree?(or why can’t we get closer to each other faster)

• Even in execution with no failures agreement may beimpossible

• The possibility of other worlds existing (failures), affectwhat is achievable

Page 99: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Consequence for the monitors

Given that there are different perspectives,different opinions about the validity of φ are unavoidable!

• The number of opinions needed depends on φ

[Fraigniaud, R, Travers RV2014]

Page 100: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,
Distributed ComputingandTopology
Page 101: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Topology

Placing together all these views yields a simplicial complex

Page 102: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Topology

Placing together all these views yields a simplicial complex

“Frozen” representation all possible interleavings and failure scenarios into a single, static, simplicial complex

Page 103: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Topology

Each simplex is an interleaving

Page 104: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Topology

views label vertices of a simplex

Each simplex is an interleaving

Page 105: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Topological invariants

• ,

Page 106: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Topological invariants

• ,

Preserved as computation unfolds

Page 107: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Topological invariants

• ,

Preserved as computation unfolds

Come from the nature of the faults and asynchrony in the system

Page 108: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 109: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Short History

Distributed Computing through Combinatorial Topology, Herlihy, Kozlov, Rajsbaum, Elsevier 2014

Page 110: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Distributed Computing through Combinatorial Topology, Herlihy, Kozlov, Rajsbaum, Elsevier 2014

Page 111: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Distributed Computing through Combinatorial Topology, Herlihy, Kozlov, Rajsbaum, Elsevier 2014

Page 112: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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:

Distributed Computing through Combinatorial Topology, Herlihy, Kozlov, Rajsbaum, Elsevier 2014

Page 113: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Distributed Computing through Combinatorial Topology, Herlihy, Kozlov, Rajsbaum, Elsevier 2014

Page 114: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 115: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

What would a theory of distributed computing be?

Page 116: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Distributed systems...

• Individual sequential processes

• Cooperate to solve some problem

• By message passing, shared memory, or any other mechanism

Page 117: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Many kinds

• Multicore, various shared-memory systems

• Internet

• Interplanetary internet

• Wireless and mobile

• cloud computing, etc.

Page 118: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 119: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

Page 120: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

• Models of distributed computing systems:

Page 121: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

• Models of distributed computing systems:communication, timing, failures, which models are central?

Page 122: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

• Models of distributed computing systems:communication, timing, failures, which models are central?

• Distributed Problems:

Page 123: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

• Models of distributed computing systems:communication, timing, failures, which models are central?

• Distributed Problems:one-shot task, long-lived tasks, verification, graph problems, anonymous,…

Page 124: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

• Models of distributed computing systems:communication, timing, failures, which models are central?

• Distributed Problems:one-shot task, long-lived tasks, verification, graph problems, anonymous,…

• Computability, complexity, decidability

Page 125: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

• Models of distributed computing systems:communication, timing, failures, which models are central?

• Distributed Problems:one-shot task, long-lived tasks, verification, graph problems, anonymous,…

• Computability, complexity, decidability• Topological invariants:

Page 126: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

• Models of distributed computing systems:communication, timing, failures, which models are central?

• Distributed Problems:one-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

Page 127: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Theory of distributed computing research

• Models of distributed computing systems:communication, timing, failures, which models are central?

• Distributed Problems:one-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

Page 128: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

A “universal” distributed computing model (a Turing Machine for DC)

Page 129: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Ingredients of a model

• processes

• communication

• failures

Page 130: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Ingredients of a model

• processes

• communication

• failures

Page 131: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Ingredients of a model

• processes

• communication

• failures

Page 132: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Once we have a “universal” model, how

to study it?

Page 133: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

multi-read/multi-writer

single-reader/single-writer message passing

t failures stronger objects failure detectors

Page 134: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Iterated model

multi-read/multi-writer

single-reader/single-writer message passing

t failures stronger objects failure detectors

generic techniques, simulations

and reductions

Page 135: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Iterated shared memory

( a Turing Machine for DC ? )

Page 136: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

n Processes

Page 137: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

asynchronous, wait-free

Page 138: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Unbounded sequence ofread/write

shared arrays

Page 139: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

• use each one once• in order

Page 140: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

write, then read

8

Page 141: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

8

8,-,-

Page 142: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

8

8,-,-

Page 143: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

8

8,-,-

3 4

Page 144: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

8

8,-,-

3 4

8,3,4 8,3,4

Page 145: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

8

8,-,-

3 4

8,3,4 8,3,4

Page 146: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Asynchrony- solo run

Page 147: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Asynchrony- solo run

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

2

4

1

Page 148: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

every copy is new

Page 149: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

Page 150: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

2

Page 151: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

2

Page 152: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

2-,2,-

Page 153: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

2 3

Page 154: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

2 -,2,33

Page 155: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

2 31

Page 156: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

21,2,3

31

Page 157: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

21,2,3

31

Page 158: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order•last one sees all

2 31

returns 1,2,3

Page 159: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•remaining 2 go to next memory

2 31

Page 160: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•remaining 2 go to next memory

2 31

2

Page 161: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•remaining 2 go to next memory

2 31

2

-,2,-

Page 162: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•3rd one returns -,2,3

2 31

2-,2,3

3

Page 163: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•3rd one returns -,2,3

2 31

2 3

Page 164: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•2nd one goes alone

2 31

2 3

Page 165: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

2 31

2 3

2

dd

-,2,-

Page 166: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•returns -,2,-

2 31

2 3

2

dd

Page 167: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

so in this run, the views are

-,2,3

-,2,-

Page 168: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

so in this run, the views are

-,2,3

1,2,3

-,2,-

Page 169: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

another run

Page 170: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

•arrive in arbitrary order

2 31

Page 171: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

• all see all

2 31

Page 172: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

• all see all

21,2,3

31

Page 173: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

View graph

Page 174: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

indistinguishability

0

0 1

Page 175: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

indistinguishability

0

0 1

??

Page 176: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

indistinguishability• The most essential

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

0 1

??

Page 177: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

0

0 1

??

Page 178: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

0

0 1

??

Page 179: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

0

0 1

??

Page 180: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Indistinguishability graph for 2 processes

Page 181: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

• focus on 2 processes

• there may be more that arrive after

2

Page 182: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

sees only itself

2

Page 183: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

sees only itself

2-,2,-

Page 184: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

• green sees both

• but ...

2 3

Page 185: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

• green sees both

• but ...

2 -,2,33

Page 186: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

• green sees both

• but ...

2 -,2,33-,2,-

Page 187: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

2 3

• green sees both

• but, doesn't know if seen by the other

Page 188: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

2 -,2,33

• green sees both

• but, doesn't know if seen by the other

Page 189: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

2 -,2,33

??

• green sees both

• but, doesn't know if seen by the other

Page 190: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

2 -,2,33-,2,-

??

• green sees both

• but, doesn't know if seen by the other

Page 191: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

2 -,2,33-,2,-

-,2,3

??

• green sees both

• but, doesn't know if seen by the other

Page 192: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

one round graph for 2 processes

Page 193: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

one round graph for 2 processes

solo

Page 194: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

one round graph for 2 processes

solosolo

Page 195: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

see each other

see each other

one round graph for 2 processes

solosolo

Page 196: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

round 2:

round 1:

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

Page 197: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

round 2:

round 1:

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

Page 198: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

round 2:

round 1:

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

Page 199: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

round 2:

round 1:

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

Page 200: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

round 2:

round 1:

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

Page 201: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

solo sees both

round 2:

Page 202: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

solo sees both

solo in both rounds

round 2:

Page 203: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

solo sees both

round 2:

Page 204: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

solo sees both

round 2:sees both,

then solo in 2nd

Page 205: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

iterated runs

round 1:

round 2:

see each other in 1st round

see each other in both

Page 206: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

More rounds

round 1:

round 2:

round 3:

Topological invariant: protocol graph after k rounds

-longer-but always connected

Page 207: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Wait-free theorem for 2 processes

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

-longer-but always connected

Page 208: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Iterated approach: theorem holds in other models

easy iterated proof : local, iterate

any number of processes

any number of processes, any

number of failures

message passing

non-iterated model

Page 209: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Iterated approach: theorem holds in other models

• Via known, generic simulation

easy iterated proof : local, iterate

any number of processes

any number of processes, any

number of failures

message passing

non-iterated model

Page 210: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 211: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

implications in terms of

- solvability- complexity- computability

Page 212: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Distributed problems binary consensus

0 0

1 1

0 0

1 1

Input Graph Output Graph

Page 213: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Distributed problems binary consensus

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Page 214: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Distributed problems binary consensus

0 0

1 1

0 0

1 1

start with same inputdecide same output

Input Graph Output Graph

Input/outputrelation

Page 215: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Distributed problems binary consensus

0 0

1 1

0 0

1 1

Input Graph Output Graph

different inputs, agree on any

Input/outputrelation

Page 216: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Page 217: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Page 218: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Each edge is an initial configuration of the protocol

Page 219: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Each edge is an initial configuration of the protocolsubdivided after 1 round

Page 220: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Each edge is an initial configuration of the protocolsubdivided after 1 roundno solution in 1 round

Page 221: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Each edge is an initial configuration of the protocolsubdivided after 1 roundno solution in 1 round decide

decide

Page 222: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Each edge is an initial configuration of the protocolsubdivided after 1 roundno solution in 1 round decide

decide

no solution in k rounds

Page 223: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Each edge is an initial configuration of the protocolsubdivided after 1 roundno solution in 1 round decide

decide

no solution in k rounds

Page 224: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Binary consensus is not solvable due to connectivity

0 0

1 1

0 0

1 1

Input Graph Output Graph

Input/outputrelation

Each edge is an initial configuration of the protocolsubdivided after 1 roundno solution in 1 round decide

decide

no solution in k rounds

Page 225: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

corollaries: consensus impossible in the

iterated model

Page 226: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

consensus impossibility holds in other models

2 process binary iterated

any number of processes

any number of processes, any

number of failures

message passing

non-iterated model

Page 227: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

consensus impossibility holds in other models

• Via known, generic simulation

2 process binary iterated

any number of processes

any number of processes, any

number of failures

message passing

non-iterated model

Page 228: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 229: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Decidability

Page 230: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

model?

Page 231: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 232: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 233: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Beyond 2 processes

from 1-dimensional graphs to n-dimensional complexes

Page 234: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

2-dim simplex • three local states in

some execution

• 2-dimensional simplex

• e.g. inputs 0,1,2

0

1 2

Page 235: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

3-dim simplex• 4 local states in some

execution

• 3-dim simplex

• e.g. inputs 0,1,2,3

0

1 2

3

Page 236: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

complexes

Collection of simplexes closed

under containment

Page 237: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

consensus task 3 processes

Input Complex

0

0

01

1

0

0 0

1

1 1

Output Complex

Page 238: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Iterated model

One initial state

Page 239: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Iterated model

after 1 round all see each other

Page 240: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Iterated model

after 1 round 2 don’t know ifother saw them

Page 241: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Iterated model

after 1 round 1 doesn't know if2 other saw it

Page 242: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 243: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 244: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Decidability

Page 245: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

model?

Page 246: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 247: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 248: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Extension to other models

3 process 2-agreem iterated

any number of processes

any number of processes, 2 or more failures

message passing

non-iterated model

Page 249: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Extension to other models

• Via known, generic simulation

3 process 2-agreem iterated

any number of processes

any number of processes, 2 or more failures

message passing

non-iterated model

Page 250: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 251: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Conclusions

Page 252: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Conclusions

• In distributed computing there are too many different issues of interest, no single model can capture them all

Page 253: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Synchronous protocol complex evolution

Connected butnot 1-connected

Disconnected

Page 254: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Conclusions

Page 255: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Conclusions

Page 256: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

Conclusions

• But the iterated model (with extensions not discussed here) captures essential distributed computing aspects

Page 257: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

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

Page 258: Computability in distributed computing - LIX - …Computability in distributed computing Distributed computability has a topological nature Discovered in 1993: Herlihy, Shavit, Borowski,

END