Distributed Algorithms (22903)

Slides:



Advertisements
Similar presentations
Mutual Exclusion – SW & HW By Oded Regev. Outline: Short review on the Bakery algorithm Short review on the Bakery algorithm Black & White Algorithm Black.
Advertisements

MCC8.EE.7 a and b: Solving Equations with Variables on Both Sides.
A Completeness theorem for a class of synchronization objects Afek.Y, Weisberger.E, Weisman.H Presented by: Reut Schwartz.
Chapter 7 - Local Stabilization1 Chapter 7: roadmap 7.1 Super stabilization 7.2 Self-Stabilizing Fault-Containing Algorithms 7.3 Error-Detection Codes.
1 © R. Guerraoui The Power of Registers Prof R. Guerraoui Distributed Programming Laboratory.
Efficiency of Algorithms Csci 107 Lecture 6-7. Topics –Data cleanup algorithms Copy-over, shuffle-left, converging pointers –Efficiency of data cleanup.
Multiprocessor Synchronization Algorithms ( ) Lecturer: Danny Hendler The Mutual Exclusion problem.
A Mile-High View of Concurrent Algorithms Hagit Attiya Technion.
CPSC 668Set 17: Fault-Tolerant Register Simulations1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Distributed Algorithms (22903) Lecturer: Danny Hendler Shared objects: linearizability, wait-freedom and simulations Most of this presentation is based.
What Can Be Implemented Anonymously ? Paper by Rachid Guerraui and Eric Ruppert Presentation by Amir Anter 1.
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
Hagit Attiya (CS, Technion) Joint work with Rachid Guerraoui (EPFL) Eric Ruppert (York University) Partial Snapshots.
SOLVING SYSTEMS USING SUBSTITUTION
Chapter 2 Section 7 Two-Variable Inequalities. Linear Inequality Linear Inequality – an inequality in two variables whose graph is a region of the coordinate.
Atomic Snapshots. Abstract Data Types Abstract representation of data & set of methods (operations) for accessing it Implement using primitives on base.
DISTRIBUTED ALGORITHMS By Nancy.A.Lynch Chapter 18 LOGICAL TIME By Sudha Elavarti.
SEMINAR OPEN PROBLEMS IN DISTRIBUTED COMPUTING Winter Hagit Attiya & Faith Ellen Introduction1.
Mutual Exclusion Using Atomic Registers Lecturer: Netanel Dahan Instructor: Prof. Yehuda Afek B.Sc. Seminar on Distributed Computation Tel-Aviv University.
Common2 extended to stacks and unbound concurrency By:Yehuda Afek Eli Gafni Adam Morrison May 2007 Presentor: Dima Liahovitsky 1.
1.7 Linear Inequalities.  With an inequality, you are finding all values of x for which the inequality is true.  Such values are solutions and are said.
Max Registers, Counters, and Monotone Circuits Keren Censor, Technion Joint work with: James Aspnes, Yale University Hagit Attiya, Technion (Slides
Distributed Algorithms (22903) Lecturer: Danny Hendler The wait-free hierarchy and the universality of consensus This presentation is based on the book.
Distributed Algorithms (22903) Lecturer: Danny Hendler The Atomic Snapshot Object The Renaming Problem This presentation is based on the book “Distributed.
Scalable lock-free Stack Algorithm Wael Yehia York University February 8, 2010.
Distributed Algorithms (22903) Lecturer: Danny Hendler Shared objects: linearizability, wait-freedom and simulations Most of this presentation is based.
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
Distributed Algorithms (22903) Lecturer: Danny Hendler Approximate agreement This presentation is based on the book “Distributed Computing” by Hagit attiya.
Distributed Systems Lecture 6 Global states and snapshots 1.
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Lecture 14 Searching and Sorting Richard Gesick.
O(log n / log log n) RMRs Randomized Mutual Exclusion
Solving Equations with the Variable on Both Sides
7.6 Common Array Algorithm: Filling
CSE 486/586 Distributed Systems Global States
Distributed Algorithms (22903)
Computing with anonymous processes
Distributed Algorithms (22903)
CS137: Electronic Design Automation
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Formal Models of Distributed Systems
Distributed Algorithms (22903)
Concurrency Control via Timestamps
(Slides were added to Keren’s original presentation. DH.)
Lecture 11 Searching and Sorting Richard Gesick.
Solution Solution Checking Solutions of Inequalities
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Lecture 20 Syed Mansoor Sarwar
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Time And Global Clocks CMPT 431.
Lecture 29 Syed Mansoor Sarwar
Logical Operations In Matlab.
Distributed Algorithms (22903)
Multiprocessor Synchronization Algorithms ( )
Distributed Algorithms (22903)
Instructor: Aaron Roth
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
Skip List: formally A skip list for a set S of distinct (key, element) items is a series of lists S0, S1 , … , Sh such that Each list Si contains the special.
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
CSE 486/586 Distributed Systems Global States
Computing with anonymous processes
(Slides were added to Keren’s original presentation. DH.)
Presentation transcript:

Distributed Algorithms (22903) Atomic Snapshot Lecturer: Danny Hendler This presentation is based on the book “Distributed Computing” by Hagit attiya & Jennifer Welch.

Atomic snapshot objects Each process has a SWMR register, which we call a segment A process may obtain an ‘atomic snapshot’ of all segments. Atomic Snapshot sequential specification Two operations are supported: Scan, returns a vector V, where V is an n-element vector called a view (with a value for each segment), and Updatei(d), by pi, updates pi’s segment to value d.

Atomic snapshot simulation A scan collects all segments twice (double collect). If the two collects are identical, they are a snapshot What if segments change while being collected? Then we try again and again until some segment undergoes “enough” changes (we can be sure its last update started after our scan) We then use a scan embedded in that udpate

A wait-free simulation of atomic snapshot Initially segment[i].ts=0, segment[i].data=vi, segment[i].view=<v0, …, vn-1> Updatei(S, d) view:=scan() Segment[i]=<segment[i].ts+1, d, view) Scani(S) for all j <> i c[j]=Segment[j] while true do for all j a[j] = Segment[j] for all j b[j] = Segment[j] if, for all j a[j]=b[j] return <b[0].data, …, b[n-1].data> ; Direct scan else if, for some j ≠ i, b[j].ts - c[j].ts ≥ 2 return b[j].view ; Indirect scan

Linearization order A direct scan is linearized immediately after the last read of its first collect An indirect scan is linearized at the same point as the direct scan whose view it borrowed. An update is linearized when it writes to its segment.

A proof that the algorithm for atomic snapshot is wait-free and linearizable

A space-bounded simulation of atomic snapshot Instead of the unbounded timestamp, we use a handshaking mechanism between each pair of processes Processes pi, pj interact via two shared SRSW handshaking bits: hi, hj. ; Handshaking procedures for the ordered pair (pi, pj) procedure tryHSi() ; process pi tries to handshake with pj hi := hj procedure tryHSj() ; process pj tries to handshake with pi hj := 1-hi procedure checkHSi() process pj checks whether a handshake occurred return (hi ≠ hj) procedure checkHSj() process pj checks whether a handshake occurred return (hi = hj)

Handshaking properties Handshaking property 1 If a checkHSi returns true, then there exists a tryHSj whose write occurs between the read of the previous tryHSi and the read of the checkHSi. Handshaking property 2 If a checkHSi returns false, then there is no tryHSj whose read and write occurs between the write of the previous tryHSi and the read of the checkHSi.

The bounded-space algorithm Initially segment[i].data=vi, segment[i].view=<v0, …, vn-1> Local variable shook[j]=0 for all j We add a toggle bit to each data element Updatei(S, d) view:=scan() Segment[i]=<d, view, 1-Segment[i].toggle) Scani(S) for all j <> i shook[j] := 0 while true do for all j ≠ i tryHSi(i,j) for all j ≠ i a[j] = Segment[j] for all j ≠ i b[j] = Segment[j] if, for some j ≠ i, checkHSi(i,j) or (a[j].toggle ≠ a[j].toggle) if (shook[j]=2) return b[j].view ; Indirect scan else shook[j]=shook[j]+1 else if, for all j, a[j]=b[j] return <b[0].data, …, b[n-1].data> ; Direct scan