erez druk seminar in distributed algorithms, 10/6/13

35
Linearizable Implementations Do Not Suffice For Randomized Distributed Computation Wojciech Golab, Lisa Higham, Philipp Woelfel Erez Druk Seminar in Distributed Algorithms, 10/6/13

Upload: duscha

Post on 24-Feb-2016

55 views

Category:

Documents


0 download

DESCRIPTION

Linearizable Implementations Do Not Suffice For Randomized Distributed Computation Wojciech Golab , Lisa Higham , Philipp Woelfel. Erez Druk Seminar in Distributed Algorithms, 10/6/13. Overview. Motivation Preliminaries Main Theorem Good to Know Conclusion Questions. Motivation. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Linearizable Implementations Do Not Suffice For Randomized Distributed Computation

Wojciech Golab, Lisa Higham, Philipp Woelfel

Erez DrukSeminar in Distributed Algorithms, 10/6/13

Page 2: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Overview Motivation Preliminaries Main Theorem Good to Know Conclusion Questions

Page 3: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Motivation Linearizability

Simplicity Correctness Intuitive Local & Composable Useful

Page 4: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Motivation Randomization

Simplicity Achieves the impossible Natural Cool

Page 5: Erez Druk Seminar in Distributed Algorithms, 10/6/13

The Big Question Can we combine the two?

NO!

Page 6: Erez Druk Seminar in Distributed Algorithms, 10/6/13

An Example is a register initialized to

An adversary tries to minimize the value that reads

Page 7: Erez Druk Seminar in Distributed Algorithms, 10/6/13

An Example When is atomic

The expected value of ’s is at least

1 2 0 /2

𝑅𝑒𝑎𝑑

Page 8: Erez Druk Seminar in Distributed Algorithms, 10/6/13

An Example When is implemented via atomic bits [Vid88]

𝑊𝑟𝑖𝑡𝑒(𝑣)

00

1

𝑅𝑒𝑎𝑑 ()

00

1

Page 9: Erez Druk Seminar in Distributed Algorithms, 10/6/13

An Example When is implemented via atomic bits [Vid88]

The expected value of ’s is

010

011

001

0/101

Start reading Finish reading

Page 10: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Another Example have access to a shared snapshot object

An adversary tries to minimize the some of values that observes

Page 11: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Another Example Atmoic

The expected value of ’s is

𝑆𝑐𝑎𝑛()

(0 ,0 ) (2 ,0 ) (0 ,0 ) (0 ,6 ) (0 ,−8/8 )

Page 12: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Another Example Linearizable implementation [AADGMS93]

𝑆𝑐𝑎𝑛( )

𝑥1

𝑈𝑝𝑑𝑎𝑡𝑒 (𝑣 )

𝑥2 𝑥𝑛 𝑣𝑥2 𝑥𝑛

Wait for two identical collects, or

Burrow from a process which updated twice

Scan Write the whole

snapshot

Page 13: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Another Example Linearizable implementation

[AADGMS93]𝑆𝑐𝑎𝑛()𝐶𝑜𝑙𝑙𝑒𝑐𝑡 𝐶𝑜𝑙𝑙𝑒𝑐𝑡 𝐶𝑜𝑙𝑙𝑒𝑐𝑡

𝑈𝑝𝑑𝑎𝑡𝑒 (2) 𝑈𝑝𝑑𝑎𝑡𝑒 (0)𝑆𝑐𝑎𝑛()

𝑊𝑟𝑖𝑡𝑒𝑈𝑝𝑑𝑎𝑡𝑒 (6) 𝑈𝑝𝑑𝑎𝑡𝑒 (8𝑐)

The expected value of ’s is

Page 14: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Some definitions A coin flip vector is an infinite binary vector An adversary is a function from past coin flips

to the set of processes An history is a sequence of steps of processes An history is sequential if it is sequential An history is linearizable if there is a

sequential history that agrees with it denotes the prefix-closure of a set of histories is the history formed by running algorithm

with adversary and coin flips vector

Page 15: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Some definitions and are equivalent if for any there

exists a sequential history that is a linearization of both and

For convenience we denote

Page 16: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Goal Fix the following theorem Let be an algorithm that uses atomic

objects and be obtained from by replacing some objects with linearizable implementations. Then for any there exists such that and are equivalent

Page 17: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Strong Linearizability A set of histories is strongly linearizable if

there exists a function mapping of histories in to sequential histories such that is a linearization of is prefix preserving

A shared object is strongly linearizable if its set of histories is strongly linearizable

From here on is obtained from by replacing some object with their strongly linearizable implementation

Page 18: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Main Theorem For every adversary there exists an

adversary such that and are equivalent.

Page 19: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Main Theorem - Proof Need to find such that and are

simultaneously linearizable is already sequential How can we guarantee that is a

linearization of ? (hint: use the assumptions!)

Let Need such that Define to be the schedule of

For every adversary there exists an adversary such that and are equivalent.

Page 20: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Main Theorem - Proof For every adversary

there exists an adversary such that and are equivalent.

:

:

𝑓

𝒜 (�⃗� )=¿

Page 21: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Main Theorem - Proof Done? What is ? Locality – A set of strongly linearizable

objects is strongly linearizable

For every adversary there exists an adversary such that and are equivalent.

Page 22: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Locality Lemma Highly Technical Induction on are the histories of length at most is good for

Page 23: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Locality Lemma - from

: 𝑘: With : With

𝑓 1 ¿ ¿𝑘 ¿∘ 𝜆

Define

¿ 𝑓 1 ¿

Page 24: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Main Theorem - Proof Done? is not allowed to cheat

For every adversary there exists an adversary such that and are equivalent.

Page 25: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Main Theorem - Proof For every adversary

there exists an adversary such that and are equivalent.

:

:

:

:

Page 26: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Main Theorem - Proof Fix Move coin flips to the earliest point

possible

For every adversary there exists an adversary such that and are equivalent.

:

:

:

:

Page 27: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Main Theorem - Proof is good if is used Done?

For every adversary there exists an adversary such that and are equivalent.

Yes!

Page 28: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Strong Linearizability is Necessary If and are equivalent then is strongly

linearizable

Page 29: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Necessity If and are equivalent

then is strongly linearizable

Should linearize and have the same linearization is already linearized Define

Page 30: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Necessity If and are equivalent

then is strongly linearizable

Done? must map all

:

:

: :

Page 31: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Necessity If and are equivalent

then is strongly linearizable

Done? depends on the choice of Lemma: No it doesn’t The theorem follows

Page 32: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Good to Know Composability Weak Adversaries Feasibility Proof techniques

Page 33: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Conclusion Linearizability & Randomization

Examples Strong Linearizability

Sufficient Necessary Local & Composable Feasible

Page 34: Erez Druk Seminar in Distributed Algorithms, 10/6/13

(Easy )Questions?

Page 35: Erez Druk Seminar in Distributed Algorithms, 10/6/13

Thanks For Listening!