Distributed Algorithms (22903) Lecturer: Danny Hendler Approximate agreement This presentation is based on the book “Distributed Computing” by Hagit attiya.

Slides:



Advertisements
Similar presentations
1 © R. Guerraoui The Limitations of Registers R. Guerraoui Distributed Programming Laboratory.
Advertisements

Image Modeling & Segmentation
Lecture 19: Parallel Algorithms
1 © R. Guerraoui The Power of Registers Prof R. Guerraoui Distributed Programming Laboratory.
Fast Algorithms For Hierarchical Range Histogram Constructions
Multiprocessor Synchronization Algorithms ( ) Lecturer: Danny Hendler The Mutual Exclusion problem.
EM Algorithm Jur van den Berg.
Two Techniques for Proving Lower Bounds Hagit Attiya Technion TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
CSE 326: Data Structures Lecture #4 Alon Halevy Spring Quarter 2001.
Failure Detectors. Can we do anything in asynchronous systems? Reliable broadcast –Process j sends a message m to all processes in the system –Requirement:
CPSC 668Set 19: Asynchronous Solvability1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Infinite Horizon Problems
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 668Set 9: Fault Tolerant Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CS 206 Introduction to Computer Science II 11 / 17 / 2008 Instructor: Michael Eckmann.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 5: Synchronous Uniform.
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
Tirgul 9 Hash Tables (continued) Reminder Examples.
 Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 6: Impossibility.
CPSC 668Set 11: Asynchronous Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Lecture 10: Search Structures and Hashing
CPSC 668Set 11: Asynchronous Consensus1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
 Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 12: Impossibility.
CS 206 Introduction to Computer Science II 04 / 06 / 2009 Instructor: Michael Eckmann.
Lecture 2 We have given O(n 3 ), O(n 2 ), O(nlogn) algorithms for the max sub-range problem. This time, a linear time algorithm! The idea is as follows:
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
1 Chapter 24 Developing Efficient Algorithms. 2 Executing Time Suppose two algorithms perform the same task such as search (linear search vs. binary search)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 11: Asynchronous Consensus 1.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 19: Asynchronous Solvability 1.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 18: Wait-Free Simulations Beyond Registers 1.
CS 61B Data Structures and Programming Methodology July 28, 2008 David Sun.
CS Winter 2010 Tree Sort. Useful Properties of Sorted Data Structures Skip Lists (as well as AVL Trees, and various other data structures we will.
1 Lectures on Parallel and Distributed Algorithms COMP 523: Advanced Algorithmic Techniques Lecturer: Dariusz Kowalski Lectures on Parallel and Distributed.
1 Chapter 9 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
CSC 211 Data Structures Lecture 13
DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch Set 11: Asynchronous Consensus 1.
1 Chapter 10 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
1 Consensus Hierarchy Part 1. 2 Consensus in Shared Memory Consider processors in shared memory: which try to solve the consensus problem.
1 Markov Decision Processes Infinite Horizon Problems Alan Fern * * Based in part on slides by Craig Boutilier and Daniel Weld.
Distributed systems Consensus Prof R. Guerraoui Distributed Programming Laboratory.
CS 106 Introduction to Computer Science I 03 / 02 / 2007 Instructor: Michael Eckmann.
Asynchronous Exclusive Selection Bogdan Chlebus, U. Colorado Darek Kowalski, U. Liverpool.
Chapter 21 Asynchronous Network Computing with Process Failures By Sindhu Karthikeyan.
Distributed Algorithms (22903) Lecturer: Danny Hendler The wait-free hierarchy and the universality of consensus This presentation is based on the book.
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 9: Fault Tolerant Consensus 1.
Distributed Algorithms (22903) Lecturer: Danny Hendler The Atomic Snapshot Object The Renaming Problem This presentation is based on the book “Distributed.
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
R. Brafman and M. Tennenholtz Presented by Daniel Rasmussen.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Distributed Algorithms (22903)
Lecture 18: Uniformity Testing Monotonicity Testing
Alternating Bit Protocol
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Distributed Algorithms (22903)
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
Presentation transcript:

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

Approximate Agreement Wait-freedom: Eventually, each nonfaulty process decides.  -Agreement: All decisions are within  of each other. Validity: All decisions are within the range of the input values.

Approximate Agreement Algorithm: assuming input range is known Assume processes know the range from which input values are drawn: –let D be the length of this range algorithm is structured as a series of "asynchronous rounds": –exchange values via a snapshot object, one per round –compute midpoint for next round continue until spread of values is within , which requires about log 2 D/  rounds

Approximate Agreement Algorithm (cont’d) Constant: M= max (  log 2 (D/  ) ,1) Shared: Snapshot ASO[M] initialized to empty Local: int v ;this is p i 's estimate, initialized with p i ’s input int r ;this is the asynchronous round number values[M] ;array to store snapshots taken in M rounds Program for process i 1.For r = 1 to to M 2. update i (ASO[r], v) ;update v’s entry in the r’th snapshot object 3. values[r] := scan(ASO[r]) ;take the r’th snapshot 4. v := midpoint(values[r]) ;adjust estimate 5.return v

Correctness proof Lemma 1: Consider any round r < M. There exists a value, u, such that the values written to ASO[r+1] are in this range: u min(U r )max(U r )(min(U r )+u)/2(max(U r )+u)/2 elements of U r+1 are in this range

Handling Unknown Input Range Range might not be known. Actual range in an execution might be much smaller than maximum possible range, so number of rounds may be reduced.

Handling Unknown Input Range Use just one atomic snapshot object Dynamically recalculate how many rounds are needed as more inputs are revealed Skip over rounds to try to catch up to maximum observed round Only consider values associated with maximum observed round Still use midpoint

Approximate Agreement Algorithm (unknown inputs range) Program for process i 1.S.update i ( ) ;estimate in round 1 is my value 2.repeat 3.,…, := S.scan() ;take a snapshot 4. maxRound := max(log 2 (spread(x 0,…x n-1 )/ ε ), 1) 5. r max := max{r 0,…,r n-1 } ;maximal round number I saw so far 6. values := {v j | r j = r max, 0 ≤ j ≤ n-1} ;only consider maximal round 7. S.update i ( )) ;skip to r max +1 round 8.until rmax ≥ maxRound ;until ε - agreement is guaranteed 9.return midpoint(values) Shared: Snapshot S, each entry is of the form, initially empty Local: int v ;this is p i ’s estimate, initialized with p i ’s input int r max ;this is maximal round number I saw values ;a set of numbers

The algorithm is a correct wait-free implementation of approximate-agreement