24
Brief Announcement: Sorting on Skip Chains Ajoy K. Datta, Lawrence L. Larmore, and Stéphane Devismes

Brief Announcement: Sorting on Skip Chains Ajoy K. Datta, Lawrence L. Larmore, and Stéphane Devismes

Embed Size (px)

Citation preview

Brief Announcement: Sorting on Skip Chains

Ajoy K. Datta, Lawrence L. Larmore, and Stéphane Devismes

SSS'2011, Grenoble 2

Skip Chain

October, 11, 2011

Left Right

Major nodes

Relay nodes

SSS'2011, Grenoble 3

Skip Chain Sorting

October, 11, 2011

3 6 2

2 3 6

SSS'2011, Grenoble 4

Contribution

• Skip Chain Sorting Algorithm– Self-stabilizing– Silent– Locally shared memory model

• Unfair demon• O(b) space, b = number of bits to encode a value• O(md) rounds

– m : number of major nodes– d : maximum number of relay between two major nodes– md = O(n) if the spacing between major processes is roughtly

equal

October, 11, 2011

SSS'2011, Grenoble 5

Overview

• Idea : distributed bubble sort

October, 11, 2011

Arbitrary Configurations

Normal Configurations

Legitimate Configurations

Error Correction

Sorting

SSS'2011, Grenoble 6

Data Structure

October, 11, 2011

3 26

SSS'2011, Grenoble 7

Swap

October, 11, 2011

26

6 6 6 266

2 2 2 622

Synchronization between swaps : 4 colors

SSS'2011, Grenoble 8

Colors

• A value moves to the left at the crest of wave 0

• A value moves to the right at the crest of wave 1

• Colors 2 and 3 to avoid ambiguïty and to synchronize

• Color E: error color

October, 11, 2011

SSS'2011, Grenoble 9

Example

October, 11, 2011

X Y z

33 03 20

Compare and swap

V(y)V(x)

SSS'2011, Grenoble 10

Example

October, 11, 2011

X Y z

33 10 20

V(y)’V(x)’

0, V(x)’ 1, V(y)’

SSS'2011, Grenoble 11

Example

October, 11, 2011

X Y z

03 10 21

Compare and swap

V(y)’V(x)’ V(y)’V(u) V(x)’

SSS'2011, Grenoble 12

Example

October, 11, 2011

X Y z

10 10 32

Compare and swap

V(y)’V(x)’V(x)’’ V(y)’V(u)’

21, V(x)’’

SSS'2011, Grenoble 13

Example

October, 11, 2011

X Y z

10 21 32

V(y)’V(x)’’V(x)’’ V(y)’V(u)’

SSS'2011, Grenoble 14

Example

October, 11, 2011

X Y z

10 32 32

V(y)’V(x)’’V(x)’’ V(y)’V(u)’

2 3

SSS'2011, Grenoble 15

Example

October, 11, 2011

X Y z

20 32 33

V(y)’V(x)’’V(x)’’ V(y)’V(u)’

SSS'2011, Grenoble 16

Example

October, 11, 2011

X Y z

21 32 03

V(y)’V(x)’’V(x)’’ V(y)’ V(z)V(u)’

Compare and swap

SSS'2011, Grenoble 17

Example

October, 11, 2011

X Y z

32 32 10

V(y)’V(x)’’V(x)’’ V(y)’’ V(z)’V(u)’

0, V(y)’’ 3

SSS'2011, Grenoble 18

Example

October, 11, 2011

X Y z

32 03 10

V(y)’’V(x)’’V(x)’’ V(y)’’ V(z)’V(u)’

SSS'2011, Grenoble 19

Example

October, 11, 2011

X Y z

33 03 20

V(y)’’V(x)’’V(x)’’ V(y)’’ V(z)’V(u)’

SSS'2011, Grenoble 20

Error correction

October, 11, 2011

SSS'2011, Grenoble 21

Silence

October, 11, 2011

2 2 3 3 3 3 62 32

Done

SSS'2011, Grenoble 22

Perspective

• Can we enhance the round complexity to O(n) rounds ?

• Step complexity ?

October, 11, 2011

SSS'2011, Grenoble 23

Thank youOctober, 11, 2011

SSS'2011, Grenoble 24

Min-Max Search Tree

October, 11, 2011

10

1

95

84 7

62

<= <=

3<=

min

min

max

max