+ All Categories
Home > Documents > How Shall I Name Thee? Let me count the ways...

How Shall I Name Thee? Let me count the ways...

Date post: 23-Feb-2016
Category:
Upload: bina
View: 23 times
Download: 0 times
Share this document with a friend
Description:
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. - PowerPoint PPT Presentation
76
How Shall I Name Thee? Let me count the ways... Hagit Attiya, Technion Armando Castañeda, Technion Maurice Herlihy, Brown Ami Paz, Technion
Transcript
Page 1: How Shall I Name Thee? Let me count the ways...

How Shall I Name Thee?

Let me count the ways...

Hagit Attiya, TechnionArmando Castañeda, TechnionMaurice Herlihy, BrownAmi Paz, Technion

Page 2: How Shall I Name Thee? Let me count the ways...

2

M-Renaming

Unboundedidentifiers

Unique namesin 1,…,M

5

8

2

Renaming

p1

p2

p3

p1

p2

p3

Page 3: How Shall I Name Thee? Let me count the ways...

3

M-Renaming Bounds

1,...,nM 2n-1,... 1,...,n 2n-1,... n+1,... 2n-2

n is a primepower

n is nota primepower ?

Page 4: How Shall I Name Thee? Let me count the ways...

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

Page 5: How Shall I Name Thee? Let me count the ways...

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

Page 6: How Shall I Name Thee? Let me count the ways...

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

Page 7: How Shall I Name Thee? Let me count the ways...

7

Immediate Snapshots (IS)An execution is a sequence of blocks: sets of processes that– Write together and then– Scan (read everything) together

Page 8: How Shall I Name Thee? Let me count the ways...

8

• Indistinguishable executions: , if the process p has the same view in and in

IS Executions

Page 9: How Shall I Name Thee? Let me count the ways...

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

Page 10: How Shall I Name Thee? Let me count the ways...

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

Page 11: How Shall I Name Thee? Let me count the ways...

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

Page 12: How Shall I Name Thee? Let me count the ways...

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

Page 13: How Shall I Name Thee? Let me count the ways...

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

Page 14: How Shall I Name Thee? Let me count the ways...

The Lower Bound

Page 15: How Shall I Name Thee? Let me count the ways...

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   α

𝒔𝒊𝒈𝒏 (𝜶 )

Page 16: How Shall I Name Thee? Let me count the ways...

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   α

𝒔𝒊𝒈𝒏 (𝜶 )

Page 17: How Shall I Name Thee? Let me count the ways...

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

Page 18: How Shall I Name Thee? Let me count the ways...

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

Page 19: How Shall I Name Thee? Let me count the ways...

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)

Page 20: How Shall I Name Thee? Let me count the ways...

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)

Page 21: How Shall I Name Thee? Let me count the ways...

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  α

𝒔𝒊𝒈𝒏 (𝜶)

Page 22: How Shall I Name Thee? Let me count the ways...

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  α

𝒔𝒊𝒈𝒏 (𝜶)

Page 23: How Shall I Name Thee? Let me count the ways...

23

Signed Count of and ( seen)

is seen in : Cancel out by AR Lemma.Same holds for

Signed  count= ∑(𝜶 ,𝒑𝒊 )∈𝑿 𝑨

(−𝟏)𝒊 ∙ 𝒔𝒊𝒈𝒏(𝜶)

Page 24: How Shall I Name Thee? Let me count the ways...

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= ∑(𝜶 ,𝒑𝒊 )∈𝑿 𝑨

(−𝟏)𝒊 ∙ 𝒔𝒊𝒈𝒏(𝜶)

Page 25: How Shall I Name Thee? Let me count the ways...

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

Page 26: How Shall I Name Thee? Let me count the ways...

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

Page 27: How Shall I Name Thee? Let me count the ways...

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

Page 28: How Shall I Name Thee? Let me count the ways...

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

Page 29: How Shall I Name Thee? Let me count the ways...

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

Page 30: How Shall I Name Thee? Let me count the ways...

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

Page 31: How Shall I Name Thee? Let me count the ways...

The Upper Bound

Page 32: How Shall I Name Thee? Let me count the ways...

32

Topology 101: Simplex

• Set of vertexes

Dimension: Number of vertexes -1 A face is a sub-simplex• Chromatic: vertexes have different colors

{𝑥 } {𝑥 , 𝑦 } {𝑥 , 𝑦 ,𝑧 } {𝑥 , 𝑦 ,𝑧 ,𝑤 }

Page 33: How Shall I Name Thee? Let me count the ways...

33

Topology 101: Simplicial Complexes

• Gluing simplexes together

• Some complexes are subdivisions of others

Page 34: How Shall I Name Thee? Let me count the ways...

34

A vertex represents a local state of a processA simplex represents a global system state

Distributed Computing Topology

zx

a

zx

y

Page 35: How Shall I Name Thee? Let me count the ways...

35

Distributed Computing Topology

Glue together indistinguishabile executions

zx

y

zx

aa

Page 36: How Shall I Name Thee? Let me count the ways...

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

Page 37: How Shall I Name Thee? Let me count the ways...

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

Page 38: How Shall I Name Thee? Let me count the ways...

38

IS Executions as the Standard Subdivision: 2 Processes

• Execution:

Page 39: How Shall I Name Thee? Let me count the ways...

39

IIS Executions as the Standard Subdivision: 2 Processes

• Execution:

Page 40: How Shall I Name Thee? Let me count the ways...

40

IIS Executions as the Standard Subdivision: 3 Processes

• Execution:

Page 41: How Shall I Name Thee? Let me count the ways...

41

IIS Executions as the Standard Subdivision: 3 Processes

• Execution:

Page 42: How Shall I Name Thee? Let me count the ways...

42

IIS Executions as the Standard Subdivision: 3 Processes

• Execution:

Page 43: How Shall I Name Thee? Let me count the ways...

43

Standard Subdivision (Std S)

StdK S = apply the standard subdivision K times

Page 44: How Shall I Name Thee? Let me count the ways...

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]

Page 45: How Shall I Name Thee? Let me count the ways...

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

Page 46: How Shall I Name Thee? Let me count the ways...

46

Output Function for WSB

Binary values

No univalued n-simplexes

Symmetric onthe boundaries

Page 47: How Shall I Name Thee? Let me count the ways...

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

Page 48: How Shall I Name Thee? Let me count the ways...

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

Page 49: How Shall I Name Thee? Let me count the ways...

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

Page 50: How Shall I Name Thee? Let me count the ways...

50

Step One: Univalued Signed Count

Std S USC  = 1+∑𝑖=1

𝑛− 1

(𝑛𝑖 )𝑘𝑖=0

Page 51: How Shall I Name Thee? Let me count the ways...

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

Page 52: How Shall I Name Thee? Let me count the ways...

52

Step One: Univalued Signed Count

Std S

Divide and then extend

USC  = 1+∑𝑖=1

𝑛−1

(𝑛𝑖 )𝑘𝑖=0

Page 53: How Shall I Name Thee? Let me count the ways...

53

Step One: Univalued Signed Count

USC  = 1+∑𝑖=1

𝑛−1

(𝑛𝑖 )𝑘𝑖=0

Divide and then extend

Page 54: How Shall I Name Thee? Let me count the ways...

54

Step One: Univalued Signed Count

USC  = 1+∑𝑖=1

𝑛− 1

(𝑛𝑖 )𝑘𝑖=0

Divide and then extend Not

standard subdivision

Page 55: How Shall I Name Thee? Let me count the ways...

55

Step One: Univalued Signed Count

ki univalued simplexes from each face of

dimension i

USC  = 1+∑𝑖=1

𝑛−1

(𝑛𝑖 )𝑘𝑖=0

Page 56: How Shall I Name Thee? Let me count the ways...

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

Page 57: How Shall I Name Thee? Let me count the ways...

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

Page 58: How Shall I Name Thee? Let me count the ways...

58

Step Two: Adjacent Simplexes

• Eliminate univalued simplexes by subdivision, while preserving the boundary

Page 59: How Shall I Name Thee? Let me count the ways...

59

Step Two: Non-Adjacent Simplexes

• Eliminate univalued simplexes by subdivision, while preserving the boundary

Page 60: How Shall I Name Thee? Let me count the ways...

60

• Eliminate univalued simplexes by subdivision, while preserving the boundary

• Similar construction• subdivisions

for -length path.

Step Two: Longer Paths

Page 61: How Shall I Name Thee? Let me count the ways...

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

Page 62: How Shall I Name Thee? Let me count the ways...

62

Step Two: Connect

Find a path between univalued simplexes with opposite signs

Page 63: How Shall I Name Thee? Let me count the ways...

63

Step Two: Rinse

Subdivide until the path has no univalued simplexes

Page 64: How Shall I Name Thee? Let me count the ways...

64

Step Two: Rinse & Repeat

Subdivide until the path has no univalued simplexes

Page 65: How Shall I Name Thee? Let me count the ways...

65

Step Two: Rinse & Repeat

Until there are no univalued simplexes

Page 66: How Shall I Name Thee? Let me count the ways...

66

Step Two: Number of Subdivisions

Chop into paths with O(n) length, using a constant number of subdivisions

Page 67: How Shall I Name Thee? Let me count the ways...

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)

Page 68: How Shall I Name Thee? Let me count the ways...

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

Page 69: How Shall I Name Thee? Let me count the ways...

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

Page 70: How Shall I Name Thee? Let me count the ways...

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)

Page 71: How Shall I Name Thee? Let me count the ways...

71

We Used Cone Subdivisions

How to get an algorithm?

Page 72: How Shall I Name Thee? Let me count the ways...

72

Getting an Algorithm

Map standard subdivision to cone subdivisionLift the output function

Page 73: How Shall I Name Thee? Let me count the ways...

73

Getting an Algorithm

Map simplexes to simplexes, preserving• process identifiers• structure of the subdivision

Page 74: How Shall I Name Thee? Let me count the ways...

74

Getting an Algorithm

Iterated immediate snapshots, for an appropriate number of times, then output the associated value

Page 75: How Shall I Name Thee? Let me count the ways...

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

Page 76: How Shall I Name Thee? Let me count the ways...

76

To be Continued…My course next semester: 236755

Thesis topics


Recommended