Diffusing Computation. Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple.

Slides:



Advertisements
Similar presentations
Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
Advertisements

CS 542: Topics in Distributed Systems Diganta Goswami.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Lecture 8: Asynchronous Network Algorithms
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Failure Detection The ping-ack failure detector in a synchronous system satisfies – A: completeness – B: accuracy – C: neither – D: both.
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.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
Lecture 4: Elections, Reset Anish Arora CSE 763 Notes include material from Dr. Jeff Brumfield.
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.
1 Complexity of Network Synchronization Raeda Naamnieh.
CS 582 / CMPE 481 Distributed Systems
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
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.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
TORA : Temporally Ordered Routing Algorithm Invented by Vincent Park and M.Scott Corson from University of Maryland. TORA is an on-demand routing protocol.
Introduction to computer networking Distributed Algorithms Class Recitation.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Election Algorithms and Distributed Processing Section 6.5.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed Mutual Exclusion.
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
Centralized mutual exclusion Problem : What if the coordinator fails? Solution : Elect a new one.
Consensus and Its Impossibility in Asynchronous Systems.
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 Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
Defining Programs, Specifications, fault-tolerance, etc.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
1 © R. Guerraoui Regular register algorithms R. Guerraoui Distributed Programming Laboratory lpdwww.epfl.ch.
Vector Clock Each process maintains an array of clocks –vc.j.k denotes the knowledge that j has about the clock of k –vc.j.j, thus, denotes the clock of.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
Chapter 7 –System Model – typical assumptions underlying the study of distributed deadlock detection Only reusable resources, only exclusive access, single.
Studying Different Problems from Distributed Computing Several of these problems are motivated by trying to use solutiions used in `centralized computing’
Lecture 11-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) September 28, 2010 Lecture 11 Leader Election.
Stabilization Presented by Xiaozhou David Zhu. Contents What-is Motivation 3 Definitions An Example Refinements Reference.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion & Leader Election Steve Ko Computer Sciences and Engineering University.
Leader Election (if we ignore the failure detection part)
CS 542: Topics in Distributed Systems Self-Stabilization.
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 ::
1 Fault tolerance in distributed systems n Motivation n robust and stabilizing algorithms n failure models n robust algorithms u decision problems u impossibility.
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.
Design of Nonmasking Tree Algorithm Goal: design a tree construction protocol systematically by constructing its invariant and fault-span.
Design of Tree Algorithm Objectives –Learning about satisfying safety and liveness of a distributed program –Apply the method of utilizing invariants and.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
CSC 8420 Advanced Operating Systems Georgia State University Yi Pan Transactions are communications with ACID property: Atomicity: all or nothing Consistency:
Classifying fault-tolerance Masking tolerance. Application runs as it is. The failure does not have a visible impact. All properties (both liveness & safety)
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
Revisiting Logical Clocks: Mutual Exclusion Problem statement: Given a set of n processes, and a shared resource, it is required that: –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.
CIS 825 Lecture 8. Leader Election Aim is to elect exactly one node as the leader.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Paxos Steve Ko Computer Sciences and Engineering University at Buffalo.
1 Traversal Algorithms  sequential polling algorithm  traversing connected networks (tree construction) complexity measures tree terminology tarry’s.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
“Designing Masking Fault Tolerance via Nonmasking Fault Tolerance“ Oğuzhan YILDIRIM – Erkin GÜVEL Boğaziçi University Computer Engineering Department
CSE 486/586 Distributed Systems Leader Election
Raymond Mutual Exclusion
Lecture 9: Asynchronous Network Algorithms
Leader Election (if we ignore the failure detection part)
CSE 486/586 Distributed Systems Leader Election
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

Diffusing Computation

Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple trees Multiple leaders After recovery –There is a unique tree –There is a unique leader A spanning tree maintenance algorithm is a nonmasking leader election algorithm –Make it masking fault-tolerant

Using Spanning Tree Construction for Solving Leader Election Spanning tree provides a nonmasking fault-tolerant solution –Eventually, there is one leader –During recovery, The safety specification could be violated because there could be multiple leaders

Designing Masking Fault-Tolerant Solution for Leader Election Need to ensure that there is at most one leader during recovery Can be achieved if a node makes sure that before it declares itself to be the leader, there is no other leader –If this node were to become the true leader, the tree would be reconstructed to be rooted at that node –Check if the tree has been reconstructed I.e., check if all nodes are in the tree rooted at the current node

How? When j changes P.j to j –Check if all nodes have set their root value to j? –Achieved through diffusing computation Similar to one of the termination detection algorithms (next topic)

Diffusing Computation Initiation –The node that initiates the diffusing computation sends the diffusing computation message to all its children Propagation –A node propagates the diffusing computation when it receives it (for the first time) To propagate, the node sends the diffusion message to all its children A node can check some predicate (condition) during propagation

Diffusing Computation Completion –A node completes the diffusing computation iff All its children complete the diffusing computation All its neighbors have received (propagated) that diffusing computation A node can also check some predicate during completion –The results from this condition are propagated towards the root; The diffusing computation completes when the root completes the diffusing computation –If the condition checked by the root evaluates to true, we say that the diffusing computation completes successfully –Else, we say that the diffusing computation fails/completes unsuccessfully

Using Spanning Tree for Leader Election When a node is about to become leader –It starts a diffusing Computation –If it completes successfully, declare itself to be the leader Goal of the diffusing computation is to check if the tree is formed at the initiator node –In other words, check if root value of all nodes is equal to that of the initiator

Property If the tree is not formed then –There is at least one node j such that j is not in the tree But j has a neighbor that is in the tree

Issues –Multiple nodes may start diffusing computation Node with higher ID should win (I.e., its diffusing computation should complete successfully) Node with lower ID should lose. –Failures during diffusing computation Fail the current diffusing computation

Upon completion Upon completing an unsuccessful diffusing computation –Start another one if the node is still likely to be the leader (P.j = j) The diffusing computation may have failed due to faults Use sequence number to distinguish between different diffusing computations initiated by the same node

Actions Init P.j = j  Phase.j = prop Sn.j = newseq() Res.j = true –(Result = result of the diffusing computation) –Currently set to true, to be read only after the diffusing computation completes

Actions Propagation Root.j = root.(P.j) /\ sn.j  sn.(P.j)  If (phase.(P.j) = prop) –Phase.j = prop, res.j = true Else –Res.j = false »// Fail this diffusing computation

Actions Completion Phase.j = prop /\  k : k  Neighbors.j : root.j = root.k /\ sn.j = sn.k /\  k : k  Ch.j : phase.k = comp  res.j =  k : k  Neighbors.j  {j} : res.k Phase.j = comp If (P.j = j /\  res.j) Init(j) // Initiate a new diffusing computation

Actions Aborting Diffusing Computation Phase.j = comp, res.j = false If (P.j  Neighbors.j) res.(P.j) = false // Last part when j changes its parent. With respect to `old’ parent.

Combining with Tree Algorithm When j executes tree correction action 1 (red color propagation) –Abort(j) When j executes tree correction action 2 (changing color to green) –Init(j) When j changes tree –Abort(j)

Application in Mutual Exclusion Allow only tree root to generate the new token after faults –When a node becomes a root, set h.j = j thereby permitting it to possibly generate a token –Don’t send this token to other processes unless you ensure that you can actually generate the token If token is to be generated (safely) at the root then –All nodes must be in the same tree // done already with current task –For all nodes: h.j = P.j // condition to be checked at each node Init/Prop actions same Complete action changed as:

Actions Completion Phase.j = prop /\  k : k  Neighbors.j : root.j = root.k /\ sn.j = sn.k /\  k : k  Ch.j : phase.j = comp  res.j =  k : k  Neighbors.j  {j} : (res.k & h.k = P.k) Phase.j = comp If (P.j = j /\  res.j) Init(j) // Initiate a new diffusing computation

Diffusing Computation Can be performed in the absence of a tree –Tree is formed during diffusing computation The initiator sends the first diffusion message If node, say j, receives a diffusion from k then –If this is NOT the first diffusion message »Send a reply to k –If this is the first diffusion message then »Send the diffusion to all neighbors »Send a reply to k after replies from ALL neighbors is received »A condition can be checked based on the replies received

Diffusing Computation (continued) The node from which the diffusion message is received for the first time is the parent of that node. –Several problems can be solved by taking appropriate actions during propagation and completion of diffusion Detecting global state Termination detection

Applications of Diffusing Computations and other Terminology Route Discovery of protocols such as DSR Viral computations Global snapshots

Scalpel vs Hammer