Presentation is loading. Please wait.

Presentation is loading. Please wait.

Atomic snapshots in O(log³ n) steps using randomized helping James Aspnes, Yale Keren Censor-Hillel, Technion 1.

Similar presentations


Presentation on theme: "Atomic snapshots in O(log³ n) steps using randomized helping James Aspnes, Yale Keren Censor-Hillel, Technion 1."— Presentation transcript:

1 Atomic snapshots in O(log³ n) steps using randomized helping James Aspnes, Yale Keren Censor-Hillel, Technion 1

2 Snapshot Objects p1p1 p1p1 p2p2 p2p2 pnpn pnpn … … update( v ) scan 2 update your location read all locations

3 Model 3 System of n processes, multi-writer registers Asynchronous schedule controlled by an adversary Crash failures – require wait-free implementations Linearizable implementations p1p1 p1p1 p2p2 p2p2 R1R1 R1R1 pnpn pnpn R2R2 R2R2 R R … … read v write( v ) ok

4 Snapshots - Step Complexity 4 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(log 3 (n)) steps per operation, for polynomially many update operations [Aspnes, Attiya, Censor-Hillel, and Ellen, PODC 2012] This Talk: O(log 3 (n)) steps per operation, with high probability (without a usage bound)

5 Pointer to array location 5 s1s1 s1s1 s2s2 s2s2 s3s3 s3s3 s4s4 s4s4 s 1 +s 2 s 3 +s 4 s 1 +...+s 4 0 Tree structure, Updates help Scans 00 1 1 1 2 2 2 3 3 4 5 Array of views 5 [Aspnes, Attiya, Censor-Hillel, and Ellen, PODC 2012 ] O(log n) steps?

6 Two Challenges 6 s1s1 s1s1 s2s2 s2s2 s3s3 s3s3 s4s4 s4s4 s 1 +s 2 s 3 +s 4 s 1 +...+s 4 5 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

7 Two Challenges 7 s1s1 s1s1 s2s2 s2s2 s3s3 s3s3 s4s4 s4s4 s 1 +s 2 s 3 +s 4 s 1 +...+s 4 5 2. Guaranteeing consistent views. Max-array: returns comparable pairs of max-register values [Aspnes, Attiya, Censor-Hillel, and Ellen, PODC 2012 ]

8 Our Results Randomized max-register in O(logn) steps with high probability Randomized 2-component max-array O(log 2 n) steps whp Randomized snapshot in O(log 3 n) steps whp Main technique: randomized helping 8

9 Max-Register switch = 0 value 0 value 1 value v value v’ … … … write( v ) switch = 1 read 9

10 Max-Register switch = 0 value 0 value 1 value v value v’ … … … write( v ) switch = 1 read write( v’ ) switch = 1 write( v’’ ) 10

11 Randomized Max-Register switch = 0 … … write( v ) switch = 1 m-valued max register 11

12 Randomized Max-Register switch = 0 … … write( v ) switch = 1 k-bounded increments: value of write ≤ k + value of largest write m-valued max register O(log m + kn/m) = O(log n) steps per write 12

13 Writing to the Max-Register 0 0 … … write( v ) 1 1 1 1 TS: HELP: POINTER: write( v ) pipi v', ts[j]  TS[j] p j (cyclic) i read (random) size n 3 13 read v’ = max(returned value, v)

14 Reading the Max-Register 0 0 … … read 1 1 1 1 TS: HELP: POINTER: read pipi read (returns v, ts[j]) pjpj read (returns i) +1 (random) size n 3 (logarithmic no. of steps) if ts[j]==TS[j] return v Main argument: many read steps  many fresh values in pointer array, whp Main argument: many read steps  many fresh values in pointer array, whp 14

15 2-Component Max Array 15 write0( v ) read update first max-register read both max-registers write1( v ) update second max-register

16 Max Array Implementation switch = 0 value 0 value 1 value v value v’ … … … write0( v ) read 16 Max1 write1( v ) Max1

17 Randomized 2-Component Max Array switch = 0 … … write( v ) switch = 1 17 Max1 Problem: readers do not travel all the way from root to value Max1 Solution: read Max at root instead of Max at previous location

18 Summary 18 Randomized snapshot in O(log 3 n) steps whp Main Technique: Randomized helping Open problems: – Snapshot implementations using single-writer registers – Additional randomized implementations – Randomized lower bounds Thank you! Questions?


Download ppt "Atomic snapshots in O(log³ n) steps using randomized helping James Aspnes, Yale Keren Censor-Hillel, Technion 1."

Similar presentations


Ads by Google