Chapter 14 Synchronizers. Synchronizers : Introduction Simulate a synchronous network over an asynchronous underlying network Possible in the absence.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

MPI Message Passing Interface
Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
UBE529 Distributed Coordination. 2 Leader Election Gerard LeLann posed the Election problem in a famous paper 1977 Many distributed systems are client.
Distributed Leader Election Algorithms in Synchronous Ring Networks
Computer Networking A Top-Down Approach Chapter 4.7.
Lecture 8: Asynchronous Network Algorithms
Chapter 15 Basic Asynchronous Network Algorithms
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty.
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
Termination Detection of Diffusing Computations Chapter 19 Distributed Algorithms by Nancy Lynch Presented by Jamie Payton Oct. 3, 2003.
Lecture 7: Synchronous Network Algorithms
Breadth-First Search and Shortest Path Kevin Schaffer Chapter 15.4 from “Distributed Algorithms” by Nancy A. Lynch.
Minimum Spanning Trees
Chapter 18 Self-Stabilization. Introduction Self-stabilization: Tolerate ‘data faults’  Example: Parent pointers in a spanning tree getting corrupted.
UBE529 Distributed Algorithms Self Stabilization.
Termination Detection. Goal Study the development of a protocol for termination detection with the help of invariants.
Termination Detection Part 1. Goal Study the development of a protocol for termination detection with the help of invariants.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
1 Complexity of Network Synchronization Raeda Naamnieh.
CPSC 668Set 2: Basic Graph Algorithms1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Distributed Algorithms Broadcast and spanning tree.
Chapter 4 - Self-Stabilizing Algorithms for Model Conservation4-1 Chapter 4: roadmap 4.1 Token Passing: Converting a Central Daemon to read/write 4.2 Data-Link.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Trees - Ed. 2. and 3.: Chapter 6 - Ed. 4.: Chapter 7.
Leader Election in Rings
Chapter 11 Detecting Termination and Deadlocks. Motivation – Diffusing computation Started by a special process, the environment environment sends messages.
Introduction to computer networking Distributed Algorithms Class Recitation.
Introduction to Computer Networks 09/23 Presenter: Fatemah Panahi.
Broadcast & Convergecast Downcast & Upcast
Distributed Computing 5. Synchronization Shmuel Zaks ©
Synchronous Algorithms I Barrier Synchronizations and Computing LBTS.
Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 10 Instructor: Haifeng YU.
Chapter 9 Global Snapshot. Global state  A set of local states that are concurrent with each other Concurrent states: no two states have a happened before.
Diffusing Computation. Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple.
Review for Exam 2. Topics included Deadlock detection Resource and communication deadlock Graph algorithms: Routing, spanning tree, MST, leader election.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
1 Broadcast. 2 3 Use a spanning tree Root 4 synchronous It takes the same time at link to send a message It takes the same time at each node to process.
Termination Detection
The Complexity of Distributed Algorithms. Common measures Space complexity How much space is needed per process to run an algorithm? (measured in terms.
2007/03/26OPLAB, NTUIM1 A Proactive Tree Recovery Mechanism for Resilient Overlay Network Networking, IEEE/ACM Transactions on Volume 15, Issue 1, Feb.
Diffusing Computation. Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple.
Leader Election (if we ignore the failure detection part)
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 2: Basic Graph Algorithms 1.
Vertex Coloring Distributed Algorithms for Multi-Agent Networks
Chapter 21 Asynchronous Network Computing with Process Failures By Sindhu Karthikeyan.
Hwajung Lee. Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.   i,j  V  i,j are non-faulty ::
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
TreeCast: A Stateless Addressing and Routing Architecture for Sensor Networks Santashil PalChaudhuri, Shu Du, Ami K. Saha, and David B. Johnson Department.
1 Chapter 11 Global Properties (Distributed Termination)
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Clock Synchronization (Time Management) Deadlock Avoidance Using Null Messages.
6.852: Distributed Algorithms Spring, 2008 Class 10.
Parallel and Distributed Simulation Deadlock Detection & Recovery: Performance Barrier Mechanisms.
Parallel and Distributed Simulation Deadlock Detection & Recovery.
CIS 825 Lecture 9. Minimum Spanning tree construction Each node is a subtree/fragment by itself. Select the minimum outgoing edge of the fragment Send.
CIS 825 Lecture 8. Leader Election Aim is to elect exactly one node as the leader.
Distributed Algorithms for Network Diameter David Peleg, Liam Roditty and Elad Tal.
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty ::
Parallel and Distributed Simulation
Lecture 9: Asynchronous Network Algorithms
Leader Election (if we ignore the failure detection part)
Lecture 8: Synchronous Network Algorithms
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Bridges and Link Layer Switches
Optional Read Slides: Network Multicast
Synchronizers Outline motivation principles and definitions
Presentation transcript:

Chapter 14 Synchronizers

Synchronizers : Introduction Simulate a synchronous network over an asynchronous underlying network Possible in the absence of failures Enables us to use simple synchronous algorithms even when the underlying network is asynchronous

Synchronizers : Introduction Synchronous network abstraction: A message sent in pulse i is received at pulse i+1 Synchronizer indicates when a process can generate a pulse A process can go from pulse i to i+1 only when it has received and acted on all messages sent during pulse i-1

Synchronizers : Introduction In each pulse:  A process receives messages sent during the previous pulse  It then performs internal computation and sends out messages if required  It can execute the next pulse only when the synchronizer permits it

Synchronizer interface public interface Synchronizer { public void initialize(); // initialize the synchronizer public void sendMessage(int destId, String tag, int msg); public void nextPulse(); // block for the next pulse }

Synchronizers : Overhead The synchronous algorithm requires T synch time and M synch messages Total Message complexity :  M asynch = M init +M synch +M pulse *T synch  T asynch = T init +T pulse *T synch Here M pulse / T pulse are the messages/time required to simulate one pulse

A simple synchronizer Every process sends exactly one message to all neighbors in each pulse Wait for one message from each neighbor before executing the next pulse If the synchronous algorithm sends multiple messages in one round, pack all messages together If the synchronous algorithm does not send a message, the synchronizer sends a null message

A Simple Synchronizer: Algorithm

Simple Synchronizer : Overhead Initializing:  M init =0  T init =D Each pulse  M pulse = 2E  T pulse =1

Application: BFS tree construction Simple algorithm  root starts the computation, sends invite to all neighbors  If P i receives an invite for the first time (say from node P j ) then i sets j as its parent and sends invitations to all neighbors  Ignore all successive invites

Application: BFS tree construction This algorithm does not always give a BFS tree Run it with a synchronizer to ensure that the BFS tree is computed

//BFS tree with a synchronizer public class SynchBfsTree extends Process { int parent = -1; int level; Synchronizer s; boolean isRoot;... public void initiate() { if (isRoot) { parent = myId; level = 0; } s.initialize(this); for (int pulse = 0; pulse < N; pulse++) { if ((pulse == 0) && isRoot) { for (int i = 0; i < N; i++) if (isNeighbor(i)) s.sendMessage(i, "invite", level + 1); } s.nextPulse(); } public void handleMsg(Msg m, int src, String tag) { if (tag.equals("invite")) { if (parent == -1) { parent = src; level = m.getMessageInt(); Util.println(myId + " is at level " + level); for (int i = 0; i < N; i++) if (isNeighbor(i) && (i != src)) s.sendMessage(i, "invite", level + 1); } }

Synchronizer  Very similar to the Simple synchronizer The synchronizer generates the next pulse if all the neighbors are safe Inform all neighbors when you are safe. Acknowledge all messages so that the sending process knows when it is safe T init =DM init =D T pulse =O(1)M pulse =O(E)

Synchronizer  Idea: reduce the message complexity at the cost of time complexity Assume the existence of a rooted spanning tree A node sends subtree-safe when all the nodes in its subtree are safe When the root receives subtree-safe from all children it broadcasts pulse (using the simple broadcast discussed in the last chapter)

Synchronizer  : Overhead T init = O(N)M init =O( NlogN + E) T pulse = O(N)M pulse =O(N)