Loading in 5 sec....

Atomic snapshots in O (log³ n) steps using randomized helpingPowerPoint Presentation

Atomic snapshots in O (log³ n) steps using randomized helping

Download Presentation

Atomic snapshots in O (log³ n) steps using randomized helping

Loading in 2 Seconds...

- 85 Views
- Uploaded on
- Presentation posted in: General

Atomic snapshots in O (log³ n) steps using randomized helping

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Atomic snapshots in O(log³ n) steps using randomized helping

James Aspnes, Yale

Keren Censor-Hillel, Technion

…

update(v)

scan

read all locations

update your location

p1

p2

pn

…

R1

R2

R

…

read

v

write(v)

ok

p1

p2

pn

…

System of nprocesses, multi-writer registers

Asynchronous schedule controlled by an adversary

Crash failures – require wait-free implementations

Linearizable implementations

Using multi-writer registers:

can be done in O(n)steps [Inoue and Chen, WDAG 1994]

and requires Ω(n) steps [Jayanti, Tan, and Toueg, SICOMP 1996]

Goal: a faster snapshot implementation (polylog)

Limited-use: O(log3(n)) steps per operation, for polynomially many update operations [Aspnes, Attiya, Censor-Hillel, and Ellen, PODC 2012]

This Talk: O(log3(n)) steps per operation, with high probability(without a usage bound)

[Aspnes, Attiya, Censor-Hillel, and Ellen, PODC 2012]

O(log n) steps?

Array of views

Pointer to array location

X

5

2

0

1

4

3

5

s1+...+s4

1

2

0

0

2

3

1

s1+s2

s3+s4

s1

s2

s3

s4

1. Coping with slow operations. Max-register: returns largest value previously written [Aspnes, Attiya, and Censor-Hillel, JACM 2012]

Consecutive values differ by at most n

5

s1+...+s4

s1+s2

s3+s4

s1

s2

s3

s4

2. Guaranteeing consistent views. Max-array: returns comparable pairs of max-register values [Aspnes, Attiya, Censor-Hillel, and Ellen, PODC 2012]

5

s1+...+s4

s1+s2

s3+s4

s1

s2

s3

s4

Randomized max-register inO(logn) steps with high probability

Randomized 2-component max-array

O(log2n) steps whp

Randomized snapshot in O(log3n) steps whp

Main technique: randomized helping

switch = 0

switch = 1

read

switch = 0

switch = 0

…

…

value 0

value 1

value v

value v’

…

write(v)

switch = 0

switch = 1

read

switch = 0

switch = 1

switch = 0

…

…

value 0

value 1

value v

value v’

…

write(v)

write(v’)

write(v’’)

switch = 0

switch = 1

switch = 0

switch = 1

…

m-valued max register

switch = 0

…

write(v)

switch = 0

switch = 1

k-bounded increments:value of write ≤ k + value of largest write

switch = 0

switch = 1

…

m-valued max register

switch = 0

…

O(log m + kn/m) = O(log n) steps per write

write(v)

pj(cyclic)

1

TS:

read

1

v’ = max(returned value, v)

read

write(v)

pi

…

HELP:

0

v', ts[j]TS[j]

(random)

…

size n3

POINTER:

i

write(v)

pj

read

1

TS:

+1

1

read

(logarithmic no. of steps)

pi

…

HELP:

0

read (returns v, ts[j])

Main argument:

many read stepsmany fresh values in pointer array, whp

(random)

…

size n3

POINTER:

read (returns i)

if ts[j]==TS[j] return v

write1(v)

write0(v)

update second max-register

update first max-register

read

read both max-registers

Max1

Max1

switch = 0

write1(v)

read

switch = 0

Max1

Max1

switch = 0

Max1

…

…

value 0

Max1

value 1

Max1

value v

value v’

Max1

Max1

Max1

…

write0(v)

Problem: readers do not travel all the way from root to value

switch = 0

switch = 1

Max1

Max1

Max1

switch = 1

switch = 0

Max1

Max1

Max1

Max1

Max1

…

Max1

switch = 0

Max1

Max1

Solution: read Max at root instead of Max at previous location

…

Max1

write(v)

Randomized snapshot in O(log3n) steps whp

Main Technique: Randomized helping

Open problems:

- Snapshot implementations using single-writer registers
- Additional randomized implementations
- Randomized lower bounds
Thank you! Questions?