Slides (PPTX)

Download Report

Transcript Slides (PPTX)

Combinatorial Topology
and
Distributed Computing
Part Four
Connectivity
12-Jul-16
2
Previously
Used Sperner’s Lemma to show k-set
agreement impossible when protocol
complex is a manifold.
But in most models, protocol
complexes are not manifolds …
12-Jul-16
3
Road Map
Consensus Impossibility
General theorem
Application to read-write models
k-set agreement Impossibility
General theorem
Application to read-write models
12-Jul-16
4
Road Map
Consensus Impossibility
General theorem
Application to read-write models
k-set agreement Impossibility
General theorem
Application to read-write models
12-Jul-16
5
A Path
simplicial
complex
vertex
edge
edge
vertex
12-Jul-16
vertex
edge edge
vertex
vertex
6
Path Connected
Any two vertexes can be linked by a path
12-Jul-16
7
Theorem
If …
12-Jul-16
8
Theorem
If …
For every n-simplex ¾n,
P(¾n) is path-connected …
12-Jul-16
9
Theorem
If …
For every n-simplex ¾n,
P(¾n) is path-connected …
(If no process fails)
12-Jul-16
10
Theorem
If …
For every n-simplex ¾n,
P(¾n) is path-connected …
For every (n-1)-simplex ¾n-1,
P (¾n-1) is non-empty …
Then …
(If one process fails)
12-Jul-16
11
Theorem
If …
For every n-simplex ¾n,
P(¾n) is path-connected …
For every (n-1)-simplex ¾n-1,
P (¾n-1) is non-empty …
Then …
P (¢) cannot solve consensus.
12-Jul-16
12
Model Independence
Holds for message-passing or shared memory ….
Synchronous, asynchronous, or in-between …
Any adversarial scheduler …
As long as one failure is possible.
12-Jul-16
13
Proof
P(PQR)
12-Jul-16
14
Proof
P(PQ)
P(PQR)
12-Jul-16
15
Proof
P(PQ)
P(PQR)
WLOG, P is winner
12-Jul-16
16
Proof
P(QR)
P(PQ)
P(PQR)
WLOG, P is winner
12-Jul-16
WLOG, R is winner
17
Complex is Path-Connected
P(QR)
P(PQ)
P(PQR)
12-Jul-16
18
One-dimensional Sperner’s
Lemma
Some edge has two “colors”
An execution that decides two
distinct values
P(QR)
P(PQ)
QED
P(PQR)
12-Jul-16
19
Road Map
Consensus Impossibility
General theorem
Application to read-write models
k-set agreement Impossibility
General theorem
Application to read-write models
12-Jul-16
20
Application
We now show that consensus is
impossible in wait-free read-write memory
For every n-simplex ¾n,
P(¾n) is path-connected …
For every (n-1)-simplex ¾n-1,
P(¾n-1) is non-empty.
12-Jul-16
21
Reasoning about Path
Connectivity
If each component is
path-connected ...
12-Jul-16
22
Reasoning about Path
Connectivity
If each component is
path-connected ...
12-Jul-16
and each pair-wise
intersection is non-empty ...23
Reasoning about Path
Connectivity
If each component is
path-connected ...
then their union is And each pair-wise
path-connected.
intersection is non-empty ...
12-Jul-16
24
Reachable Complexes
Reachable part
of protocol
complex
Protocol
complex
A moves
Reachable part
of protocol
complex
25
B moves
Reachable Complexes
At the end,
single simplex
reachable
26
Initially,
entire protocol
complex
reachable
Eventual
Property
Satisfied by
simplexes
27
Eventual Property
28
Suppose
it does
not hold
at start
Critical States
critical
29
Critical States Exist
Non-satisfying
critical
30
Eventual Property
Critical
states
Lowest nonsatisfying states in
tree
31
Path-Connectivity is an
Eventual Property
Path-connectivity has a
critical state c
P(c)
P
R
Q
PP
12-Jul-16
PQ
PR
32
Critical State
P(c) =
S
i2¦
Pi
Where P(c) is not
path-connected
P(c)
But
R
P each Pi is path-connected
Q
Will show each pair-wise
intersection
…P
P
P is non-empty
P
12-Jul-16
Q
R
Implying that P(c) is pathconnected after all!
33
Focus
Show that PP Å PQ is non-empty
Executions where it is ambiguous
whether P or Q moved first in c
What could P and Q be doing in c?
12-Jul-16
34
Possible Interactions
P
Q
Read x
Read y
Write x
Write y
Read x
?
?
?
?
Read y
?
?
?
?
Write x
?
?
?
?
Write y
?
?
?
?
35
Q is about to Read
c
36
Q is about to Read
P runs solo
c
PP
37
Q is about to Read
P runs solo
c
Q reads x
PP
38
Q is about to Read
P runs solo
c
Q reads x
PP
P runs solo
Same vertex!
must lie in
PQ
PP Å P Q
39
Possible Interactions
P
Q
Read x
Read y
Write x
Write y
Read x
no
no
no
no
Read y
no
no
no
no
Write x
no
no
?
?
Write y
no
no
?
?
40
Writing Distinct Variables
c
41
Writing Distinct Variables
P writes x
42
c
Writing Distinct Variables
P writes x
Q writes y
P runs solo
43
PP
c
Writing Distinct Variables
P writes x
c
Q writes y
P runs solo
44
PP
Q writes y
P writes x
Same vertex!
must lie in
PP Å P Q
P runs solo
PQ
Possible Interactions
P
Q
Read x
Read y
Write x
Write y
Read x
no
no
no
no
Read y
no
no
no
no
Write x
no
no
?
no
Write y
no
no
no
?
45
Writing Same Variable
P writes x
c
P runs solo
PP
P runs solo
46
Writing Same Variable
P writes x
c
P runs solo
Q writes x
P writes x
PP
Same vertex!
must lie in
47
PP Å P Q
P runs solo
PQ
Possible Interactions
P
Q
Read x
Read y
Write x
Write y
Read x
no
no
no
no
Read y
no
no
no
no
Write x
no
QED
no
no
no
Write y
no
no
no
no
48
Road Map
Consensus Impossibility
General theorem
Application to read-write models
k-set agreement Impossibility
General theorem
Application to read-write models
12-Jul-16
49
So Far …
Expressed solvability of consensus as a
topological property of protocol complex
…
And applied the result to wait-free
read-write memory.
Next: do the same for k-set
agreement!
12-Jul-16
50
Rethinking Path Connectivity
0-sphere
Let’s call this complex 0-connected
1-disc
1-Connectivity
1-sphere
2-disc
This Complex is not 1Connected
?
2-Connectivity
2-sphere
3-disk
n-connectivity
C is n-connected, if, for m · n, every
continuous map of the m-sphere
m
f :S ! C
can be extended to a continuous
map of the (m+1)-disk
f :D
12-Jul-16
m+ 1
! C
(-1)-connected is non-empty
55
If …
For every n-simplex ¾n,
P(¾n) is (k-1)-connected …
For every (n-1)-simplex ¾n-1,
P(¾n-1) is (k-2)-connected …
…
For every (n-k)-simplex ¾n-k,
P(¾n-k) is (-1)-connected …
k
Then P(¢) cannot solve k-set agreement.
12-Jul-16
56
Combinatorial vs Geometric
So far, definitions are combinatorial …
Simplex is a set of vertexes {v0, …, vn}
Complex is set of simplexes {¾0, …, ¾n}
12-Jul-16
57
A Geometric Vertex
Point in high-dimensional
Euclidean Space
12-Jul-16
Geometric Simplexes
0-simplex
(vertex)
1-simplex
(edge)
Convex hull of n+1 affinelyindependent points
12-Jul-16
2-simplex
(solid triangle)
3-simplex
(solid tetrahedron)
Geometric Simplicial Complex
12-Jul-16
Geometric Simplicial Complex
Every pair of simplexes
intersect either in a simplex,
or not at all
12-Jul-16
Geometric Simplicial Complex
Every pair of simplexes
intersect either in a simplex,
or Polyhedron
not at all |C| is the pointset occupied by a geometric
complex C.
12-Jul-16
Subdivisions
12-Jul-16
63
B is a subdivision of A if …
¯
For each simplex ¯ of B
there is a simplex ® of A
such that |¯| µ |®|.
®
For each simplex ® of A, |®| is the union of a
finite set of geometric simplexes of B.
12-Jul-16
64
Barycentric Subdivision
¾
Bary ¾
12-Jul-16
65
Barycentric Subdivision
Each vertex of Bary ¾
is a face of ¾
Simplex = faces
ordered by inclusion
¾
12-Jul-16
66
Barycentric Coordinates
v3
v0
x = t 0 v 0 + t1 v 1 + t 2 v 2
0 · t0,t1,t2 · 1
x
 ti = 1
v2
v1
Every point of |C| has a unique representation
using barycentric coordinates
12-Jul-16
67
From Simplicial to Continuous
simplicial
Á :A !
B
X
f (x) =
t i ¢jÁ(si )j
i
continuous
f :jA j !
12-Jul-16
jBj
extend over barycentric
coordinates
(piece-wise linear map)
68
Maps
simplicial
Á :A !
B
continuous
f :jA j !
12-Jul-16
Simplicial Approximation
Theorem
jBj
69
Simplicial Approximation
B
A
simplicial
Á: A ! B
continuous
12-Jul-16
f : jAj ! jBj
70
Simplicial Approximation
v
Á(v)
Á
12-Jul-16
A
B
71
Simplicial Approximation
f
f (v)
Á(v)
v
Á
12-Jul-16
A
B
72
Simplicial Approximation
f (v)
v
f ;Á
Á(v)
12-Jul-16
A
star(Á(v))
B
73
Simplicial Approximation
f (v)
v
12-Jul-16
A
f ;Á
star(Á(v))
B
74
Simplicial Approximation
f (v)
f ;Á
v
12-Jul-16
A
star(Á(v))
star(v)
B
75
Simplicial Approximation
f (v)
f ;Á
12-Jul-16
A
star(Á(v))
star(v)
B
76
Simplicial Approximation
f
star(v)
f(star(v))
star(Á(v))
12-Jul-16
A
B
77
Simplicial Approximation
Á is a simplicial
approximation of f if …
f(star(v))
for every v in A …
f(star(v)) µ star(Á(v))
12-Jul-16
star(Á(v))
B
78
Simplicial Approximation
Theorem
• Given a continuous map
f : jAj !
jBj
• there is an N such that f has a simplicial
approximation
Á : BaryN A ! B
12-Jul-16
Actually Holds for most other subdivisions….79
Barycentric Subdivision
Each vertex of Bary ¾
is a face of ¾
Simplex = faces
ordered by inclusion
12-Jul-16
80
Truncated Barycentric
Subdivision
Discard vertexes for faces
of dimension < n-k
12-Jul-16
81
Truncated Barycentric
Subdivision
Discard vertexes for faces
of dimension < n-k
Subdivide …
12-Jul-16
82
Truncated Barycentric
Subdivision
Discard vertexes for faces
of dimension < n-k
Subdivide …
Color each vertex with
color from carrier …
12-Jul-16
83
Truncated Barycentric
Subdivision
Discard vertexes for faces
of dimension < n-k
Subdivide …
Color each vertex with
color from carrier …
Claim: Some k-simplex has k+1
distinct colors
12-Jul-16
84
Proof
Replace discarded
vertexes
12-Jul-16
85
Proof
Replace discarded
vertexes
Sperner’s Lemma: some
n-simplex ¿ has n+1 colors
12-Jul-16
86
Proof
Replace discarded
vertexes
Sperner’s Lemma: some
n-simplex ¿ has n+1 colors
¿
12-Jul-16
A k-face of ¿ lies in the
truncated subdivision.
QED
87
Proof of Theorem
Build a continuous map:
f : j Baryk ¾j ! jP(¾)j
Such that
f (¿) µ jP(¿)j
For all ¿ µ ¾
12-Jul-16
truncated subdivision.
88
Skeleton
C
skel1 C
skel0 C
12-Jul-16
89
Inductively on Skeletons
Example: n = 2, k = 1
P
P(PR)
P(PQR)
R
P(PQ)
Q
P(QR)
12-Jul-16
90
Base Step
P(¾d ) is non-empty for d ¸ n-k
P
P(PR)
P(PQR)
R
P(PQ)
Q
P(QR)
12-Jul-16
91
Induction Step
Assume map defined on (d-1)-skeleton
P(¾n ¡
P
k+ d
) is d-connected …
P(PR)
P(PQR)
R
P(PQ)
Q
P(QR)
12-Jul-16
can “fill in” each simplex in d-skeleton92
Continuous Map
P
P(PR)
P(PQR)
R
P(PQ)
Q
P(QR)
12-Jul-16
93
Take Simplicial Approximation
P
P(PR)
P(PQR)
R
P(PQ)
Q
P(QR)
12-Jul-16
94
Color Vertex with Winning
Process ID
P
P(PR)
P(PQR)
R
P(PQ)
Q
P(QR)
12-Jul-16
95
Some simplex has k+1 distinct
colors!
P
P(PR)
P(PQR)
R
P(PQ)
Q
P(QR)
12-Jul-16
An execution that decides k+1 values!96
Model Independence
Holds for message-passing or shared memory ….
Synchronous, asynchronous, or in-between …
Any adversarial scheduler …
As long as k failures are possible.
12-Jul-16
97
If Adversary can keep …
the protocol complex k-connected forever …
k-set agreement is impossible.
the protocol complex k-connected for r rounds …
k-set agreement is impossible in fewer rounds.
the protocol complex k-connected for time t …
k-set agreement is impossible in less time.
12-Jul-16
98
Road Map
Consensus Impossibility
General theorem
Application to read-write models
k-set agreement Impossibility
General theorem
Application to read-write models
12-Jul-16
99
Application
We now show that n-set agreement is
impossible for n+1 processes in wait-free
read-write memory
For every input simplex ¾,
P(¾) is (dim ¾)-connected …
12-Jul-16
100
Covering
C= C0 [ ¢¢¢[ C`
Complex
12-Jul-16
101
Covering
C= C0 [ ¢¢¢[ C`
Complex
12-Jul-16
Covering
102
N (C0; : : : ; C` )
Ci
Vertex
CU = f Ci ji 2 Ug
Simplex, if ÅCi non-empty
12-Jul-16
103
Nerve Example: Sphere
12-Jul-16
104
Reasoning About Connectivity
Covering
Nerve
12-Jul-16
105
Nerve Lemma
Ci
If …
k-connected
\
CU =
(k-|U|+1)-connected
Ci
i2U
12-Jul-16
106
…Then
C is k-connected …
if and only if ..
N (C0, …Cm) is k-connected.
12-Jul-16
107
Nerve Example: Sphere
1-connected …
12-Jul-16
108
Reasoning About Connectivity
Can apply Nerve
Lemma!
0-connected
12-Jul-16
109
Reasoning About Connectivity
1-connected …
12-Jul-16
110
Reasoning About Connectivity
1-connected !
QED
implies
1-connected !
12-Jul-16
111
Reasoning About
Computation
P(s)
Protocol state
(processes + environment)
Reachable complex from s
12-Jul-16
112
Reasoning About
Computation
Pi = P(si )
New protocol state if Pi
moves next from s
Reachable complex if Pi moves next
Compact notation
12-Jul-16
113
Example
P1 about to read
u from M[0]
P0 about to read
u from M[0]
P0
P1
P2
Three proceses,
shared memory
12-Jul-16
P2 about to write
v to M[0]
114
Intersections of Readers
P0
P0 moves first,
reads u
P01
P1
P1 moves first,
reads u
Cannot tell which moved first
12-Jul-16
115
Intersections of Readers
P0
P01
P1
s01 is state after P0
and P1 both read
12-Jul-16
P01 = P(s01)
116
P0
Intersections of Readers and
Cannot tell which
Writers
moves first,
moved first
reads u
P0
P02
P2
P2 moves first,
writes v
12-Jul-16
117
Intersections of Readers and
Writers
P0
P02
P2
P02 = P0(s)
Protocol where
P012-Jul-16
does not participate
118
Observation
P0 Å P1 = protocol complex
with fewer pending operations
P0 Å P2 = protocol complex with
fewer participating processes
Suggests an inductive
argument …
12-Jul-16
119
Notation
Pi
Reachable complex from s if
Pi takes next step
\
PU =
Pi
i2U
Ambiguous who in U moved first
12-Jul-16
120
Notation
An execution e is a sequence of
process steps (reads & writes) …
Views of non-faulty processes
determine simplex of protocol complex
e  e’ if they determine same simplex
12-Jul-16
121
Definitions
A read by Pi 2 U is non-conflicting if no
Pj 2 U writes to same location.
A write by Pi 2 U is non-conflicting if no
Pj 2 U reads from same location.
Assume multi-reader
single-writer memory
Otherwise, operation is conflicting.
12-Jul-16
122
Lemma
Suppose Pi 2 U has a non-conflicting
operation xi pending in s …
and Pj 2 U has a pending operation xj …
Claim: Pi(s) Å Pj(s) = Pj(si)
12-Jul-16
123
One Direction
Show: Pi(s) Å Pj(s) µ Pj(si)
For every e 2 Pj(s) , e  xj ¢ e’
For every e 2 Pi(s) Å Pj(s), xi commutes
with every earlier operation, so e  xi ¢ xj ¢ e’’
So: Pi(s) Å Pj(s) µ Pj(si)
12-Jul-16
124
Other Direction
Show: Pj(si) µ Pi(s) Å Pj(s)
For every e 2 Pj(si), e  xi ¢ xj ¢ e’
So e 2 Pi(s)
For every e 2 Pj(si), e  xj ¢ xi ¢ e’
So e 2 Pj(s)
So: Pj(si) µ Pi(s) Å Pj(s)
QED
12-Jul-16
125
Lemma
Claim: PU(s) = PU-{i}(si)
Pj(si) = Pi(s) Å Pj(s)
\
\
Pj (si ) =
j 2 U¡ f i g
(Pi (s) \ Pj (s))
j 2 U¡ f ig
PU-{i}(si) = PU(s)
12-Jul-16
QED
126
Lemma
If all operations in U are nonconflicting, PU(s) = P(s’),
where s’ reachable from s
We know that PU(s) = PU-{i}(si)
12-Jul-16
Induct on number of
operations
QED
127
Lemma
If Pi 2 U has a read ri conflicting
with wj by Pj 2 U then …
Claim: Pi(s) Å Pj(s) = Pij(s)
12-Jul-16
128
Lemma
Reachable complex from s
if Pj goes first and Pi does
If Pi 2 U has a read not
ri conflicting
participate
with wj by Pj 2 U then …
Claim: Pi(s) Å Pj(s) = Pij(s)
12-Jul-16
129
One Direction
Show: Pi(s) Å Pj(s) µ Pij(s)
For e 2 Pj(s), e  wj ¢ e’ so Pi reads v
For e 2 Pi(s), e  ri ¢ e’’ so Pi reads u
For e 2 Pj(s) Å Pj(s), Pi fails before writing
So: Pi(s) Å Pj(s) µ Pij(s)
12-Jul-16
130
Other Direction
Show: Pij(s) µ Pi(s) Å Pj(s)
For every e 2 Pij(s), e  ri ¢ e’ , where Pi fails
before writing in e’
So e 2 P (s)
i
For every e 2 Pij(s) , e  wj ¢ ri ¢ e’
So e 2 Pj(s)
So: Pij(s) µ Pi(s) Å Pj(s)
12-Jul-16
131
Lemma
Claim: PU(s) = PiU-{i}(s)
Pij(s) = Pi(s) Å Pj(s)
\
\
Pj (si ) =
j 2 U¡ f i g
(Pi (s) \ Pj (s))
j 2 U¡ f ig
PiU-{i}(s) = PU(s)
12-Jul-16
132
Lemma
If operations in U are
conflicting, PU(s) = P’(s’),
where P’(¢) is an m-process
protocol for n-|U|+1 · m < n+1
We know that PU(s) = PiU-{i}(s)
Induct on number of
operations
12-Jul-16
QED
133
Corollaries
For all states s,
PU(s) is non-empty.
The nerve complex
N (P0, …, Pn) is an n-simplex
12-Jul-16
134
Main Theorem
If P is a wait-free read-write protocol,
Claim: Pi(¾) is (dim ¾)-connected
12-Jul-16
135
n-Connectivity is an Eventual
Property
n-connectivity has a critical
state c
P(c)
P0
P0
12-Jul-16
Pn
…
Pn
136
Proof Overview
P(c) =
S
i2¦
Pi
Where P(c) notP(c)
n-connected …
P0 But each P is n-connected.
Pn
i
Will show each PU is (n-|U|+1)-connected
P0
…
Pn
Nerve Lemma: P(c) is n-connected.
Contradiction!
12-Jul-16
137
(n-|U|+1)connected?
Proof
\
PU =
Pi
i2U
Induction on n …
Base case: when n=0,
P(¾) is single vertex
12-Jul-16
138
(n-|U|+1)connected?
Proof
\
PU =
Pi
i2U
If U is all non-conflicting
operations…
By Lemma: PU(c) = P(s)
where s is reachable from c.
PU(c) is (n-|U|+1)-connected
12-Jul-16
because c is critical.
139
(n-|U|+1)connected?
Proof
\
PU =
Pi
i2U
If U has conflicting
operations…
By Lemma: PU(c) = P’(s),
where P’ is an m-process protocol,
for n-|U|+1 · m < n+1
PU(c) is (n-|U|+1)-connected by
12-Jul-16
induction hypothesis for n.
140
Nerve Lemma Application
Each PU is (n-|U|+1)-connected …
So P(c) is n-connected if and only if …
N (P0, …,Pm) is n-connected.
But N(P0, …,Pm) is an n-simplex …
So P(c) is n-connected!
Contradiction
12-Jul-16
141
Conclusions
Model-independent topological
properties that prevent …
consensus
k-set agreement
path-connectivity
k-connectivity
Model-specific application to wait-free
read-write memory
12-Jul-16
142
This work is licensed under a
Creative Commons AttributionNoncommercial 3.0 Unported
License.
143