Linearizable Implementations Do Not Suffice For Randomized Distributed Computation
Wojciech Golab, Lisa Higham, Philipp Woelfel
Erez DrukSeminar in Distributed Algorithms, 10/6/13
Overview Motivation Preliminaries Main Theorem Good to Know Conclusion Questions
Motivation Linearizability
Simplicity Correctness Intuitive Local & Composable Useful
Motivation Randomization
Simplicity Achieves the impossible Natural Cool
The Big Question Can we combine the two?
NO!
An Example is a register initialized to
An adversary tries to minimize the value that reads
An Example When is atomic
The expected value of βs is at least
1 2 0 /2
π πππ
An Example When is implemented via atomic bits [Vid88]
ππππ‘π(π£)
00
1
π πππ ()
00
1
An Example When is implemented via atomic bits [Vid88]
The expected value of βs is
010
011
001
0/101
Start reading Finish reading
Another Example have access to a shared snapshot object
An adversary tries to minimize the some of values that observes
Another Example Atmoic
The expected value of βs is
ππππ()
(0 ,0 ) (2 ,0 ) (0 ,0 ) (0 ,6 ) (0 ,β8/8 )
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
Another Example Linearizable implementation
[AADGMS93]ππππ()πΆππππππ‘ πΆππππππ‘ πΆππππππ‘
πππππ‘π (2) πππππ‘π (0)ππππ()
ππππ‘ππππππ‘π (6) πππππ‘π (8π)
The expected value of βs is
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
Some definitions and are equivalent if for any there
exists a sequential history that is a linearization of both and
For convenience we denote
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
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
Main Theorem For every adversary there exists an
adversary such that and are equivalent.
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.
Main Theorem - Proof For every adversary
there exists an adversary such that and are equivalent.
:
:
π
π (οΏ½βοΏ½ )=ΒΏ
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.
Locality Lemma Highly Technical Induction on are the histories of length at most is good for
Locality Lemma - from
: π: With : With
π 1 ΒΏ ΒΏπ ΒΏβ π
Define
ΒΏ π 1 ΒΏ
Main Theorem - Proof Done? is not allowed to cheat
For every adversary there exists an adversary such that and are equivalent.
Main Theorem - Proof For every adversary
there exists an adversary such that and are equivalent.
:
:
:
:
Main Theorem - Proof Fix Move coin flips to the earliest point
possible
For every adversary there exists an adversary such that and are equivalent.
:
:
:
:
Main Theorem - Proof is good if is used Done?
For every adversary there exists an adversary such that and are equivalent.
Yes!
Strong Linearizability is Necessary If and are equivalent then is strongly
linearizable
Necessity If and are equivalent
then is strongly linearizable
Should linearize and have the same linearization is already linearized Define
Necessity If and are equivalent
then is strongly linearizable
Done? must map all
:
:
: :
Necessity If and are equivalent
then is strongly linearizable
Done? depends on the choice of Lemma: No it doesnβt The theorem follows
Good to Know Composability Weak Adversaries Feasibility Proof techniques
Conclusion Linearizability & Randomization
Examples Strong Linearizability
Sufficient Necessary Local & Composable Feasible
(Easy )Questions?
Thanks For Listening!