Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hagit Attiya (CS, Technion) Joint work with Rachid Guerraoui (EPFL) Eric Ruppert (York University) Partial Snapshots.

Similar presentations


Presentation on theme: "Hagit Attiya (CS, Technion) Joint work with Rachid Guerraoui (EPFL) Eric Ruppert (York University) Partial Snapshots."— Presentation transcript:

1 Hagit Attiya (CS, Technion) Joint work with Rachid Guerraoui (EPFL) Eric Ruppert (York University) Partial Snapshots

2 June 15, 2008SPAA2 Taking a Full Snapshot n components Update a single component Scan all the components “at once” (atomically) Provides an instantaneous view of the whole memory update ok scan v 1,…,v n

3 June 16, 2008SPAA3 Taking a Partial Snapshot n components Update a single component Scan components “at once” (atomically) Allows to read parts of the memory Worthwhile if we can do it more efficiently than a (full) scan update ok scan v i1,…,v ir

4 June 15, 2008SPAA4 Partial Snapshots: Non-Terminating Algorithm Update(v,k) A[k] =  v,seq i, i  PartialScan() repeat read A[i 1 ],…,A[i r ] if equal return A[i 1,…,i r ] double collect [Afek, Attiya, Dolev, Gafni, Merritt, Shavit, JACM 1993] Linearize: Updates with their writes Scans inside the double collects

5 June 15, 2008SPAA5 Partial Snapshot: Linearizability Double collect (read a set of values twice) If equal, there is no write between the collects –Assuming each write has a new value (seq#) Creates a “safe zone”, where the scan can be linearized read A[i 1 ],…,A[i r ] write A[j]

6 June 15, 2008SPAA6 Termination? Hat tip [Ellen, Fatuoruo, Ruppert] Embed a scan within the Update. Update(v,k) V = FullScan A[k] =  v,seq i, i,V  PartialScan() repeat read A[i 1 ],…,A[i r ] if equal return A[i 1,…,i r ] if 2 values in same component return V j Linearize: Updates with their writes Direct scans as before Borrowed scans in place direct scan borrowed scan

7 June 15, 2008SPAA7 Atomic Snapshot: Borrowed Scans Interference by process p j And another one…  p j does a scan inbeteween Linearizing with the borrowed scan is OK. write A[j] read A[j] …… …… embedded scan write A[j] read A[j] …… ……

8 June 15, 2008SPAA8 More Efficient Update Scan only components needed for overlapping scans But how to know what these are? Active set object: Tracks processes in the execution [Afek, Stupp, Touitou] active set join ok leave ok getSet S

9 June 15, 2008SPAA9 More Efficient Update Scan only components needed for overlapping scans But how to know what these are? Active set object: Tracks processes in the execution [Afek, Stupp, Touitou] active set p.join ok p.leave ok q.getSet {… …}{…,p,…}

10 June 15, 2008SPAA10 Partial Scans w/ Active Set Update(v,k) V = EmbeddedScan() A[k] =  v,seq i, i,V  PartialScan() announce {i 1, …, i r } join repeat read A[i 1 ],…,A[i r ]... leave

11 June 15, 2008SPAA11 Partial Scans w/ Active Set Update(v,k) V = EmbeddedScan() A[k] =  v,seq i, i,V  EmbbededScan() getSet read components repeat double collect needed components... if 3 different values in same component borrow the view

12 June 15, 2008SPAA12 New Active Set Algorithm To join last …. p 1716

13 June 15, 2008SPAA13 …. New Active Set Algorithm To leave GetSet reads the array ignoring empty locations last ….,17, p 1716

14 June 15, 2008SPAA14 Why in the TM Session? I need to catch a flight at 17h25 Partial snapshots are very restricted transactions –PartialScan  read-only transaction –Update  transaction writing to a single location  Understanding them provides a handle on the inherent cost of TM implementations

15 June 15, 2008SPAA15 Wrap-Up A new object: partial snapshot –Obvious applications –Implications for TM Suggested an approach for solving it using an active set object –New active set algorithms? Esp., less space. –Will have applications to adaptive algorithms. Better algorithms? Lower bounds?


Download ppt "Hagit Attiya (CS, Technion) Joint work with Rachid Guerraoui (EPFL) Eric Ruppert (York University) Partial Snapshots."

Similar presentations


Ads by Google