760 likes | 905 Views
How Shall I Name Thee? Let me count the ways. Hagit Attiya , Technion Armando Castañeda , Technion Maurice Herlihy , Brown Ami Paz , Technion . M -Renaming. p 1. p 1. 5. Renaming. p 2. p 2. 8. p 3. p 3. 2. Unbounded identifiers. Unique names in 1,…, M. M -Renaming Bounds.
E N D
How Shall I Name Thee?Let me count the ways... Hagit Attiya, Technion Armando Castañeda, Technion Maurice Herlihy, BrownAmi Paz, Technion
M-Renaming p1 p1 5 Renaming p2 p2 8 p3 p3 2 Unboundedidentifiers Unique namesin 1,…,M
M-Renaming Bounds n+1,... 2n-1,... 2n-1,... M 1,...,n 1,...,n 2n-2 n is a primepower ? n is nota primepower
Weak Symmetry Breaking (WSB) p1 p1 WSB p2 p2 p3 p3 0 / 1 outputs not all 0’s or all 1’s WSB (2n-2)-renaming WSB solvable n is a prime power
Model • ... • p1 • p2 • p3 • pn nasynchronousprocesses, communicating by atomic read / write operations Wait-freealgorithms: a process outputs after a finite number of steps, regardless of the others read write
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
Immediate Snapshots (IS) An execution is a sequence of blocks: sets of processes that • Write together and then • Scan (read everything) together
IS Executions • Indistinguishableexecutions: , if the process p has the same view in and in
IS Executions • Indistinguishableexecutions: , if the process p has the same view in and in • A process is seenin if it appears in some other process' view; otherwise, it is unseen
AR Lemma • Indistinguishableexecutions: , if the process p has the same view in and in • A process is seenin 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
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
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
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
Univalued Signed Count (USC) For an IS execution • Odd-sized blocks do not affect the sign • AR Lemma gives executions with opposite signs
Proof Strategy Prove 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!
: Trimming an Algorithm A When all processes show up, there is little uncertainty Outcome is determined by the partial execution before all processes show up Write your input and scan If all processes have arrived, output 0 Repeat: Simulate a step of A, write and scan If all processes arrive, output 1 If A outputs, output the same
: Trimming an Algorithm A • A and have the same univalued signed count Write your input and scan If all processes have arrived, output 0 Repeat: Simulate a step of A, write and scan If all processes arrive, output 1 If A outputs, output the same
Proof of Trimming • A and have the same univalued signed count (0, … ,0,…,0) (1, … ,1,0,0,…,0) (1, … ,1,1,0,…,0) (1, … ,1,…,1)
Proof of Trimming • A and have the same univalued signed count are all tuples s.t. • output 1 in • output 0 in signed count of = (0, … ,0,…,0) (1, … ,1,?,0,…,0) (1, … ,1,…,1)
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 (part 2) {0} or {1} is output in • appears in the USC, and with the same sign Same holds for
Signed Count of and (seen) is seen in : Cancel out by AR Lemma. Same holds for
Signed Count of and (unseen) is unseenin : 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
What is the USC of ? No execution in which only 1 is output (last process to start always outputs 0) Write your input and scan If all processes have arrived, output 0 Repeat: Simulate a step of A, write and scan If all processes arrive, output 1 If A outputs, output the same
What is the USC of ? No execution in which only 1 is output (last process to start always outputs 0) Write your input and scan If all processes have arrived, output 0 Repeat: Simulate a step of A, write and scan If all processes arrive, output 1 If A outputs, output the same
What is the USC of ? • All processes output 0 if they arrive together Write your input and scan If all processes have arrived, output 0 Repeat: Simulate a step of A, write and scan If all processes arrive, output 1 If A outputs, output the same
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
Symmetric Algorithms • p4 • p4 • p3 • p3 • p2 • p2 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 • p1 • p1 • p1 • p1
What is the USC of ? One execution contributes 1 Take a univalued execution in which processes output 0 in A equivalent executions (with same sign) in which all processes output 0 When , they contribute 0 mod to the USC USC mod USC
Topology 101: Simplex • Set of vertexes Dimension: Number of vertexes -1 A faceis a sub-simplex • Chromatic: vertexes have different colors
Topology 101: Simplicial Complexes • Gluing simplexestogether • Some complexes are subdivisionsof others
Distributed Computing Topology A vertex represents a local state of a process A simplex represents a global system state y x z x z a
Distributed Computing Topology Glue together indistinguishabileexecutions y x z x z a a
Distributed Computing Topology Glue together indistinguishabileexecutions • If is seen in an IS execution by P, then there is a unique IS execution by P s.t. • Also, is seen in • In the complex of IS executions, a simplex shares each face (of dimension n) with one simplex
Distributed Computing Topology Glue together indistinguishabileexecutions Initial 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
IS Executions as the Standard Subdivision: 2 Processes • Execution:
IIS Executions as the Standard Subdivision: 2 Processes • Execution:
IIS Executions as the Standard Subdivision: 3 Processes • Execution:
IIS Executions as the Standard Subdivision: 3 Processes • Execution:
IIS Executions as the Standard Subdivision: 3 Processes • Execution:
Standard Subdivision (Std S) StdKS = apply the standard subdivision Ktimes
Iterated Immediate Snapshot • Each process starts on a corner of StdkS • After iterations of immediate snapshot end on a simplex, spanned by the participating processes steps per iteration [Borowsky Gafni] step complexity
Solving WSB Do 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
Output Function for WSB Binary values No univalued n-simplexes Symmetric onthe boundaries
Output Function for WSB Binary values No univalued n-simplexes Symmetric onthe boundaries An output function from StdK Sgives a WSB algorithm with O(Kn2) step complexity
Two-Step Plan (and a Detour) Step 1:findk and a (boundary symmetric) output function from StdKSwhose univalued signed count is 0 (only 0-univalued n-simplexes) Step 2:remove the univalued n-simplexes in StdK S, while preserving symmetry
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