How Shall I Name Thee?
Let me count the ways...
Hagit Attiya, TechnionArmando Castañeda, TechnionMaurice Herlihy, BrownAmi Paz, Technion
2
M-Renaming
Unboundedidentifiers
Unique namesin 1,…,M
5
8
2
Renaming
p1
p2
p3
p1
p2
p3
3
M-Renaming Bounds
1,...,nM 2n-1,... 1,...,n 2n-1,... n+1,... 2n-2
n is a primepower
n is nota primepower ?
4
Weak Symmetry Breaking (WSB)
0 / 1 outputsnot all 0’s or all 1’s
WSB
p1
p2
p3
p1
p2
p3
WSB (2n-2)-renaming
WSB solvable n is a prime power
5
Model
n asynchronous processes, communicating by atomic read / write operationsWait-free algorithms: a process outputs after a finite number of steps, regardless of the others
...p1 p2 p3 pn
read write
6
Today
• Impossibility of WSB when n is a prime power
• n-process algorithm for WSB when n is not a prime power, with step complexity (is the largest prime factor of )
Same results for -renaming
7
Immediate Snapshots (IS)An execution is a sequence of blocks: sets of processes that– Write together and then– Scan (read everything) together
8
• Indistinguishable executions: , if the process p has the same view in and in
IS Executions
9
• Indistinguishable executions: , if the process p has the same view in and in
• A process is seen in if it appears in some other process' view; otherwise, it is unseen
IS Executions
10
AR Lemma
• Indistinguishable executions: , if the process p has the same view in and in
• A process is seen in if it appears in some other process' view; otherwise, it is unseen
If is seen in an IS execution by P, then there is a unique IS execution by P s.t.
Also, is seen in
11
AR Lemma: Proof (Case 1)
Consider the last seen round of
If is seen in an IS execution by P, then there is a unique IS execution by P s.t.
Also, is seen in
12
AR Lemma: Proof (Case 2)
Consider the last seen round of
If is seen in an IS execution by P, then there is a unique IS execution by P s.t.
Also, is seen in
13
Pairing
AR Lemma means that the IS executions by P in which is seen can be divided into pairs
• If is seen in an IS execution by P, then there is a unique IS execution by P s.t.
Also, is seen in
The Lower Bound
15
Univalued Signed Count (USC)For an IS execution
• Odd-sized blocks do not affect the sign• AR Lemma gives executions with opposite signs
∑¿ only 0 i s output in α
𝒔𝒊𝒈𝒏 (𝜶 )+(−𝟏 )𝒏∗ ∑¿o nly 1 i s output in α
𝒔𝒊𝒈𝒏 (𝜶 )
16
Proof StrategyProve that the USC of a WSB algorithm is • Trim the algorithm, preserving the USC• Prove the trimmed algorithm has USC The algorithm has a univalued IS execution!
∑¿ only 0 i s output in α
𝒔𝒊𝒈𝒏 (𝜶 )+(−𝟏 )𝒏∗ ∑¿o nly 1 i s output in α
𝒔𝒊𝒈𝒏 (𝜶 )
17
: Trimming an Algorithm A
Write your input and scanIf all processes have arrived, output 0Repeat:
Simulate a step of A, write and scanIf all processes arrive, output 1If A outputs, output the same
When all processes show up, there is little uncertainty Outcome is determined by the partial execution before all processes show up
18
: Trimming an Algorithm A
Write your input and scanIf all processes have arrived, output 0Repeat:
Simulate a step of A, write and scanIf all processes arrive, output 1If A outputs, output the same
A and have the same univalued signed count
19
Proof of TrimmingA and have the same univalued signed count
(1, … ,1,0,0,…,0)
(0, … ,0,…,0)
(1, … ,1,…,1)(1, … ,1,1,0,…,0)
20
Proof of TrimmingA and have the same univalued signed count
are all tuples s.t. • output 1 in • output 0 in
signed count of =
(1, … ,1,?,0,…,0)
(0, … ,0,…,0)
(1, … ,1,…,1)
21
Signed Count = USC (part 1)
{0,1} is output in Output vector = (1,…,1,0,..,0) s.t. Cancel out in the signed count
Signed count= ∑(𝜶 ,𝒑𝒊 )∈𝑿 𝑨
(−𝟏)𝒊 ∙ 𝒔𝒊𝒈𝒏(𝜶)
USC= ∑¿ only 0 i s output in α
𝒔𝒊𝒈𝒏 (𝜶 )+(−𝟏 )𝒏∗ ∑¿ only 1 i s output in α
𝒔𝒊𝒈𝒏 (𝜶)
22
Signed Count = USC (part 2)
{0} or {1} is output in appears in the USC, and with the same sign
Same holds for
Signed count= ∑(𝜶 ,𝒑𝒊 )∈𝑿 𝑨
(−𝟏)𝒊 ∙ 𝒔𝒊𝒈𝒏(𝜶)
USC= ∑¿ only 0 i s output in α
𝒔𝒊𝒈𝒏 (𝜶 )+(−𝟏 )𝒏∗ ∑¿ only 1 i s output in α
𝒔𝒊𝒈𝒏 (𝜶)
23
Signed Count of and ( seen)
is seen in : Cancel out by AR Lemma.Same holds for
Signed count= ∑(𝜶 ,𝒑𝒊 )∈𝑿 𝑨
(−𝟏)𝒊 ∙ 𝒔𝒊𝒈𝒏(𝜶)
24
Signed Count of and ( unseen)
is unseen in : Let be an execution of induced by the same blocks (until runs alone)
= , all but decide the same
and have the same signed count and have the same USC
Signed count= ∑(𝜶 ,𝒑𝒊 )∈𝑿 𝑨
(−𝟏)𝒊 ∙ 𝒔𝒊𝒈𝒏(𝜶)
25
No execution in which only 1 is output (last process to start always outputs 0)
What is the USC of ?
Write your input and scanIf all processes have arrived, output 0Repeat:
Simulate a step of A, write and scanIf all processes arrive, output 1If A outputs, output the same
26
What is the USC of ?
No execution in which only 1 is output (last process to start always outputs 0)
Write your input and scanIf all processes have arrived, output 0Repeat:
Simulate a step of A, write and scanIf all processes arrive, output 1If A outputs, output the same
27
What is the USC of ?
• All processes output 0 if they arrive together
Write your input and scanIf all processes have arrived, output 0Repeat:
Simulate a step of A, write and scanIf all processes arrive, output 1If A outputs, output the same
28
What is the USC of ?
• All processes output 0 if they arrive together• But there could be other executions in which all
processes output 0
• Need to assume the algorithm is symmetric
29
Symmetric Algorithms
E.g., the same outputs in an execution by p1, p2, p3 and the equivalent execution with p1, p2, p4
Equivalent executions have the same sign
p3
p1 p1
p2 p3
p1
p1
p2
p4
p4
30
What is the USC of ? ∑
only 0 in α𝒔𝒊𝒈𝒏 (𝜶 )+(−𝟏 )𝒏∗ ∑
only 1 in α𝒔𝒊𝒈𝒏 (𝜶 )
One execution contributes 1Take a univalued execution in which processes output 0 in A equivalent executions (with same sign) in which all processes output 0When , they contribute 0 mod to the USC
USC mod USC
The Upper Bound
32
Topology 101: Simplex
• Set of vertexes
Dimension: Number of vertexes -1 A face is a sub-simplex• Chromatic: vertexes have different colors
{𝑥 } {𝑥 , 𝑦 } {𝑥 , 𝑦 ,𝑧 } {𝑥 , 𝑦 ,𝑧 ,𝑤 }
33
Topology 101: Simplicial Complexes
• Gluing simplexes together
• Some complexes are subdivisions of others
34
A vertex represents a local state of a processA simplex represents a global system state
Distributed Computing Topology
zx
a
zx
y
35
Distributed Computing Topology
Glue together indistinguishabile executions
zx
y
zx
aa
36
Glue together indistinguishabile executions
Distributed Computing Topology
In the complex of IS executions, a simplex shares each face (of dimension n) with one simplex
If is seen in an IS execution by P, then there is a unique IS execution by P s.t.
Also, is seen in
37
Distributed Computing Topology
Glue together indistinguishabile executionsInitial configurations, glued together, make the input complex
The IIS executions correspond to the standard (chromatic) subdivision of the input complex
In the complex of IS executions, a simplex shares each face (of dimension n) with one simplex
38
IS Executions as the Standard Subdivision: 2 Processes
• Execution:
39
IIS Executions as the Standard Subdivision: 2 Processes
• Execution:
40
IIS Executions as the Standard Subdivision: 3 Processes
• Execution:
41
IIS Executions as the Standard Subdivision: 3 Processes
• Execution:
42
IIS Executions as the Standard Subdivision: 3 Processes
• Execution:
43
Standard Subdivision (Std S)
StdK S = apply the standard subdivision K times
44
Iterated Immediate Snapshot
Each process starts on a corner of Stdk S After iterations of immediate snapshot end on a
simplex, spanned by the participating processes
step complexity
steps per iteration [Borowsky Gafni]
45
Solving WSBDo iterated immediate snapshots & output the value associated with the vertex (its output function)
WSB is solved by finding and an output function from Stdk S
46
Output Function for WSB
Binary values
No univalued n-simplexes
Symmetric onthe boundaries
47
Binary values
No univalued n-simplexes
Symmetric onthe boundaries
Output Function for WSB
An output function from StdK S gives a WSB algorithm with O(Kn2) step complexity
48
Two-Step Plan (and a Detour)
Step 1: find k and a (boundary symmetric) output function from StdK S whose univalued signed count is 0 (only 0-univalued n-simplexes)
Step 2: remove the univalued n-simplexes in StdK S, while preserving symmetry
49
Step One: Zero USC
Number of subsets with processes: If n is not a prime power,
these quantities are relatively prime
there are small such that
50
Step One: Univalued Signed Count
Std S USC = 1+∑𝑖=1
𝑛− 1
(𝑛𝑖 )𝑘𝑖=0
51
Step One: Univalued Signed Count
Std S
Symmetrically pick simplexes in every subdivision of
a face of dimension i
USC = 1+∑𝑖=1
𝑛−1
(𝑛𝑖 )𝑘𝑖=0
52
Step One: Univalued Signed Count
Std S
Divide and then extend
USC = 1+∑𝑖=1
𝑛−1
(𝑛𝑖 )𝑘𝑖=0
53
Step One: Univalued Signed Count
USC = 1+∑𝑖=1
𝑛−1
(𝑛𝑖 )𝑘𝑖=0
Divide and then extend
54
Step One: Univalued Signed Count
USC = 1+∑𝑖=1
𝑛− 1
(𝑛𝑖 )𝑘𝑖=0
Divide and then extend Not
standard subdivision
55
Step One: Univalued Signed Count
ki univalued simplexes from each face of
dimension i
USC = 1+∑𝑖=1
𝑛−1
(𝑛𝑖 )𝑘𝑖=0
56
Step One: Univalued Signed Count
ki univalued simplexes from each face of
dimension iColor the rest blue
USC = 1+∑𝑖=1
𝑛−1
(𝑛𝑖 )𝑘𝑖=0
Some ki are negative some simplexes are counted as -1
Using small (k1, ... ,kn-1) Step one requires O(1) subdivisions
57
Step Two: Remove Univalued Subdivide Std S further to eliminate all
univalued n-simplexes
Recursive algorithm that cancels a simplex counted +1 with a simplex counted -1
While preserving symmetry on the boundary
58
Step Two: Adjacent Simplexes
• Eliminate univalued simplexes by subdivision, while preserving the boundary
59
Step Two: Non-Adjacent Simplexes
• Eliminate univalued simplexes by subdivision, while preserving the boundary
60
• Eliminate univalued simplexes by subdivision, while preserving the boundary
• Similar construction• subdivisions
for -length path.
Step Two: Longer Paths
61
Step Two: Path Length
• Cannot eliminate simplexes with odd distance• Take univalued simplexes with opposite signsAR Lemma a path between them has even length
62
Step Two: Connect
Find a path between univalued simplexes with opposite signs
63
Step Two: Rinse
Subdivide until the path has no univalued simplexes
64
Step Two: Rinse & Repeat
Subdivide until the path has no univalued simplexes
65
Step Two: Rinse & Repeat
Until there are no univalued simplexes
66
Step Two: Number of Subdivisions
Chop into paths with O(n) length, using a constant number of subdivisions
67
Step Two: Number of Subdivisions
Chop into paths with O(n) length, using a constant number of subdivisions
O(n)O(n)
O(n)
68
Step Two: Number of Subdivisions
Path of O(n) length is treated with O(n) iterationsEach iteration partitions a path P into paths of length |P| - 2, using O(1) subdivisions
69
Step Two: Number of Subdivisions
Path of O(n) length is treated with O(n) iterationsEach iteration partitions a path P into paths of length |P| - 2, using O(1) subdivisions Two univalued simplexes are eliminated within O(n) subdivisions
70
Step Two: Number of Subdivisions
Path of O(n) length is treated with O(n) iterationsEach iteration partitions a path P into paths of length |P| - 2, using O(1) subdivisions Two univalued simplexes are eliminated within O(n) subdivisions
In O(n) subdivisions, two univalued simplexes are eliminated, regardless of the path’s length
From (k1, ... ,kn-1) in step one: O(nq+2) paths in Std STotal number of subdivisions: O(nq+3)
71
We Used Cone Subdivisions
How to get an algorithm?
72
Getting an Algorithm
Map standard subdivision to cone subdivisionLift the output function
73
Getting an Algorithm
Map simplexes to simplexes, preserving• process identifiers• structure of the subdivision
74
Getting an Algorithm
Iterated immediate snapshots, for an appropriate number of times, then output the associated value
75
Wrap Up
Step 1: symmetric subdivision, zero univalued signed count– subdivisions
Step 2: eliminate pairs of univalued simplexes, while preserving symmetry– subdivisions
Step 3: map from standard subdivision– No subdivision
76
To be Continued…My course next semester: 236755
Thesis topics