Termination Detection Presented by: Yonni Edelist.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Distributed Snapshots: Determining Global States of Distributed Systems - K. Mani Chandy and Leslie Lamport.
Global States.
Distributed Snapshots: Determining Global States of Distributed Systems Joshua Eberhardt Research Paper: Kanianthra Mani Chandy and Leslie Lamport.
Distributed Leader Election Algorithms in Synchronous Ring Networks
CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
Optimal Termination Detection for Rings Murat Demirbas OSU.
Termination Detection Algorithm for Distributed Computations Edsger W. Dijkstra W.H.J. Feijen A.J.M. van Gasteren Presented by : Charu Jain.
Distributed Computing 1. Lower bound for leader election on a complete graph Shmuel Zaks ©
Justification-based TMSs (JTMS) JTMS utilizes 3 types of nodes, where each node is associated with an assertion: 1.Premises. Their justifications (provided.
Uncoordinated Checkpointing The Global State Recording Algorithm.
1 CS 194: Elections, Exclusion and Transactions Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.
Uncoordinated Checkpointing The Global State Recording Algorithm Cristian Solano.
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.
CS 484. Discrete Optimization Problems A discrete optimization problem can be expressed as (S, f) S is the set of all feasible solutions f is the cost.
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.
Distributed Computing 5. Snapshot Shmuel Zaks ©
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
Tirgul 8 Graph algorithms: Strongly connected components.
Efficient Solutions to the Replicated Log and Dictionary Problems
OSU CIS Lazy Snapshots Nigamanth Sridhar and Paul A.G. Sivilotti Computer and Information Science The Ohio State University
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.
Global State Collection. Global state collection Some applications - computing network topology - termination detection - deadlock detection Chandy-Lamport.
Distributed Snapshot (continued)
S NAPSHOT A LGORITHM. W HAT IS A S NAPSHOT - INTUITION Given a system of processors and communication channels between them, we want each processor to.
1 Complexity of Network Synchronization Raeda Naamnieh.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
S A B D C T = 0 S gets message from above and sends messages to A, C and D S.
Chapter 11 Detecting Termination and Deadlocks. Motivation – Diffusing computation Started by a special process, the environment environment sends messages.
The Byzantine Generals Strike Again Danny Dolev. Introduction We’ll build on the LSP presentation. Prove a necessary and sufficient condition on the network.
Broadcast & Convergecast Downcast & Upcast
Selected topics in distributed computing Shmuel Zaks
Sami Al-wakeel 1 Data Transmission and Computer Networks The Switching Networks.
COMON NETWORK STRUCTURES BY :Karla Barragán. STAR topology Star networks are one of the most common computer network topologies. In its simplest form,
Distributed Snapshot. Think about these -- How many messages are in transit on the internet? --What is the global state of a distributed system of N processes?
Agenda Fail Stop Processors –Problem Definition –Implementation with reliable stable storage –Implementation without reliable stable storage Failure Detection.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
More Distributed Garbage Collection DC4 Reference Listing Distributed Mark and Sweep Tracing in Groups.
Leader Election (if we ignore the failure detection part)
Hwajung Lee. -- How many messages are in transit on the internet? --What is the global state of a distributed system of N processes? How do we compute.
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 2: Basic Graph Algorithms 1.
Global State Collection
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 ::
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
1 Fault-Tolerant Consensus. 2 Communication Model Complete graph Synchronous, network.
Hwajung Lee. Some applications - computing network topology - termination detection - deadlock detection Chandy Lamport algorithm does a partial job.
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.
Efficient Algorithms for Distributed Snapshots and Global Virtual Time Approximation Author: Friedermann Mattern Presented By: Shruthi Koundinya.
Distributed Systems Lecture 6 Global states and snapshots 1.
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 ::
Termination detection
Consistent cut A cut is a set of events.
Lecture 3: State, Detection
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.
ITEC452 Distributed Computing Lecture 9 Global State Collection
Distributed Snapshot.
Leader Election (if we ignore the failure detection part)
Distributed Snapshot.
Global state collection
Global State Collection
Distributed Snapshot Distributed Systems.
ITEC452 Distributed Computing Lecture 8 Distributed Snapshot
Distributed Snapshot.
CIS825 Lecture 5 1.
Consistent cut If this is not true, then the cut is inconsistent
Distributed Snapshot.
Presentation transcript:

Termination Detection Presented by: Yonni Edelist

The model A finite graph of machines (nodes) and communication channels (edges), in which a distributed computation is taking place Machines can be either ‘active’ or ‘passive’ Only active machines may send messages Passive machine may become active only when it receives a message Active machine may become passive at any time

The model- example

The problem If, in the computation, a finite number of messages are sent, the graph will reach a stable state in which no more messages are sent One machine, say machine no. 0, wants to detect that the graph has reached that state We will build an algorithm which enables machine 0 to detect termination

example We denote messages sent by the termination detection algorithm ‘signals’

Termination detection in a ring

The model N machines, 0..N-1 Machine 0 initiates the detection algorithm Does so by sending a signal (a token) to machine 1 Machine i can propagate the token to machine i+1 We denote the machine currently holding the token ‘t’

System Invariant We describe an invariant, which will be true for every configuration of the system (for every value of t) Machine 0 will know that all other machines are passive based on: – t=0 – The invariant – (possibly) further information available at machine 0

First Invariant- P0 First step- we assume that there are no messages Meaning: an active node may become passive, but not vice-versa P0: ( ∀ i: 0≤i<t machine i is passive)

P0- Example Red outline represents an active machine

Rule 0 In order to preserve the invariant, we must follow the rule: Rule 0: Machine i transmits the token only if it’s passive (remember that a passive machine can’t become active again)

Rule 0- Example

But what if a message is sent?

Invariant P1 If machine i<t receives a message, it becomes active, thus falsifying P0 Message must have been sent by machine j≥t P1 is established whenever P0 is falsified in the above manner P0: ( ∀ i: 0≤i<t machine i is passive)

Invariant P1 (cont.) A machine can be either black or white P1: ( ∃ j: t ≤ j ≤ N: machine j is black) Rule 1: When machine j sends a message to machine i<j, it becomes black

Rule 1- Example

Invariant P1 (cont.) Now P= P0 ∨ P1 is not falsified when a message is sent to i < j. Machine 0 knows: - (t=0 ∧ machine 0 is white)  ¬P1 - P0: ( ∀ i: 0≤i<t machine i is passive) Therefore- machine 0 can still detect termination

But…

Invariant P2 P1 may be falsified when a black machine hands the token over We want to ensure that every token propagation that falsifies P1 establishes P2 We define that the token may be either black or white

Invariant P2 (cont) P2: the token is black And the accompanying rule: Rule 2: A black machine transmits a black token. A white machine doesn’t change the colour of the token

Invariant P2 (cont) Machine 0 knows: - (t=0 ∧ machine 0 is white)  ¬P1 -Token is white  ¬P2 - P0: ( ∀ i: 0≤i<t machine i is passive) Therefore- machine 0 can still detect termination

Invariant P2- Example

Rule 3 The algorithm may finish unsuccessfully Rule 3: after an unsuccessful round, machine 0 initiates another round

But…

Rule 4 Since a round that begun with a black token is doomed, we adopt: Rule 4: at the beginning of a new round, machine 0 makes itself white and transmits a white token

Still not good enough

Rule 5 Whitening a black machine i may falsify only P1, and only in the case i > t Rule 5: when transmitting the token to machine i+1, machine i makes itself white P1: ( ∃ j: t ≤ j ≤ N: machine j is black)

Final example