CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
Lecture 8: Asynchronous Network Algorithms
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
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.
Lecture 7: Synchronous Network Algorithms
Minimum Spanning Trees
Minimum Spanning Trees
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 7 Instructor: Haifeng YU.
Termination Detection. Goal Study the development of a protocol for termination detection with the help of invariants.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
1 Complexity of Network Synchronization Raeda Naamnieh.
Discussion #36 Spanning Trees
CPSC 668Set 2: Basic Graph Algorithms1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
1 Minimum Spanning Trees Gallagher-Humblet-Spira (GHS) Algorithm.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
1 Brief Announcement: Distributed Broadcasting and Mapping Protocols in Directed Anonymous Networks Michael Langberg: Open University of Israel Moshe Schwartz:
Leader Election in Rings
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
Chapter 14 Synchronizers. Synchronizers : Introduction Simulate a synchronous network over an asynchronous underlying network Possible in the absence.
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
Distributed Algorithms 2014 Igor Zarivach A Distributed Algorithm for Minimum Weight Spanning Trees By Gallager, Humblet,Spira (GHS)
Broadcast & Convergecast Downcast & Upcast
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
SEMINAR OPEN PROBLEMS IN DISTRIBUTED COMPUTING Winter Hagit Attiya & Faith Ellen Introduction1.
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.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
Leader Election (if we ignore the failure detection part)
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 2: Basic Graph Algorithms 1.
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.
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.
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.
CSC317 1 At the same time: Breadth-first search tree: If node v is discovered after u then edge uv is added to the tree. We say that u is a predecessor.
1 Traversal Algorithms  sequential polling algorithm  traversing connected networks (tree construction) complexity measures tree terminology tarry’s.
Representing Graphs Depth First Search Breadth First Search Graph Searching Algorithms.
1 Minimum Spanning Trees Gallagher-Humblet-Spira (GHS) Algorithm.
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 ::
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Breadth-First Search (BFS)
Lecture 3: Uninformed Search
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Graph Algorithms BFS, DFS, Dijkstra’s.
The Echo Algorithm The echo algorithm can be used to collect and disperse information in a distributed system It was originally designed for learning network.
Michael Langberg: Open University of Israel
CSE 2331/5331 Topic 9: Basic Graph Alg.
Election algorithm Who wins? God knows.
Lecture 9: Asynchronous Network Algorithms
CSCE 411 Design and Analysis of Algorithms
Leader Election (if we ignore the failure detection part)
CSE 421: Introduction to Algorithms
MST GALLAGER HUMBLET SPIRA ALGORITHM
Tree Construction (BFS, DFS, MST) Chapter 5
The Minimum Spanning Tree Problem
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Lectures on Graph Algorithms: searching, testing and sorting
MST GALLAGER HUMBLET SPIRA ALGORITHM
A Introduction to Computing II Lecture 13: Trees
Lecture 8: Synchronous Network Algorithms
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Algorithms: Design and Analysis
EMIS 8374 Search Algorithms Updated 9 February 2004
EMIS 8374 Search Algorithms Updated 12 February 2008
Synchronizers Outline motivation principles and definitions
Presentation transcript:

CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Set 2: Basic Graph Algorithms CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS CSCE 668 Fall 2011 Prof. Jennifer Welch

Broadcast Over a Rooted Spanning Tree Suppose processors already have information about a rooted spanning tree of the communication topology tree: connected graph with no cycles spanning tree: contains all processors rooted: there is a unique root node Implemented via parent and children local variables at each processor indicate which incident channels lead to parent and children in the rooted spanning tree Set 2: Basic Graph Algorithms CSCE 668

Broadcast Over a Rooted S.T. root initially sends M to its children when a processor receives M from its parent sends M to its children terminates (sets a local boolean to true) Exercise to transform this pseudocode into a state machine style description Set 2: Basic Graph Algorithms CSCE 668

Complexity Analysis Synchronous model: Asynchronous model: time is depth of the spanning tree, which is at most n - 1 number of messages is n - 1, since one message is sent over each spanning tree edge Asynchronous model: same time and messages Set 2: Basic Graph Algorithms CSCE 668

Convergecast Again, suppose a rooted spanning tree has already been computed by the processors parent and children variables at each processor Do the opposite of broadcast: leaves send messages to their parents non-leaves wait to get message from each child, then send combined info to parent Set 2: Basic Graph Algorithms CSCE 668

Convergecast g h a b c d e f b,d c,f,h f,h d e,g g h dotted lines: non-tree edges f,h d e,g g h solid arrows: parent-child relationships Set 2: Basic Graph Algorithms CSCE 668

Finding a Spanning Tree Given a Root Having a spanning tree is very convenient. How do you get one? Suppose a distinguished processor is known, to serve as the root. Modify the flooding algorithm… Set 2: Basic Graph Algorithms CSCE 668

Finding a Spanning Tree Given a Root root sends M to all its neighbors when non-root first gets M set the sender as its parent send "parent" msg to sender send M to all other neighbors (if no other neighbors, then terminate) when get M otherwise send "reject" msg to sender use "parent" and "reject" msgs to set children variables and know when to terminate (after hearing from all neighbors) Set 2: Basic Graph Algorithms CSCE 668

Execution of Spanning Tree Alg. root root g h a b c d e f g h a b c d e f Both models: O(m) messages O(diam) time Asynchronous: not necessarily BFS tree Synchronous: always gives breadth-first search (BFS) tree Set 2: Basic Graph Algorithms CSCE 668

Execution of Spanning Tree Alg. root g h a b c d e f No! root g h a b c d e f An asynchronous execution gave this depth-first search (DFS) tree. Is DFS property guaranteed? Another asynchronous execution results in this tree: neither BFS nor DFS Set 2: Basic Graph Algorithms CSCE 668

Finding a DFS Spanning Tree Given a Root when root first takes step or non-root first receives M: mark sender as parent (if not root) for each neighbor in series send M to it wait to get "parent" or "reject" msg in reply send "parent" msg to parent neighbor when processor receives M otherwise send "reject" to sender use "parent" and "reject" msgs to set children variables and know when to terminate Set 2: Basic Graph Algorithms CSCE 668

Finding a DFS Spanning Tree Given a Root Previous algorithm ensures that the spanning tree is always a DFS tree. Analogous to sequential DFS algorithm. Message complexity: O(m) since a constant number of messages are sent over each edge Time complexity: O(m) since each edge is explored in series. Set 2: Basic Graph Algorithms CSCE 668

Finding a Spanning Tree Without a Root Assume the processors have unique identifiers (otherwise impossible!) Idea: each processor starts running a copy of the DFS spanning tree algorithm, with itself as root tag each message with initiator's id to differentiate when copies "collide", copy with larger id wins. Message complexity: O(nm) Time complexity: O(m) Set 2: Basic Graph Algorithms CSCE 668