Chapter 10 Global Properties. Unstable Predicate Detection A predicate is stable if, once it becomes true it remains true Snapshot algorithm is not useful.

Slides:



Advertisements
Similar presentations
COMP 482: Design and Analysis of Algorithms
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.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Optimal Termination Detection for Rings Murat Demirbas OSU.
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
Program correctness The State-transition model A global state S  s 0 x s 1 x … x s m {s k = local state of process k} S0  S1  S2  … Each state transition.
Uncoordinated Checkpointing The Global State Recording Algorithm.
Uncoordinated Checkpointing The Global State Recording Algorithm Cristian Solano.
Chapter 15 Basic Asynchronous Network Algorithms
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.
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
CS542 Topics in Distributed Systems Diganta Goswami.
Distributed Computing 5. Snapshot Shmuel Zaks ©
1 Causality. 2 The “happens before” relation happens before (causes)
Efficient Solutions to the Replicated Log and Dictionary Problems
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
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.
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.
Distributed Systems Spring 2009
Ordering and Consistent Cuts Presented By Biswanath Panda.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Distributed Systems Fall 2009 Logical time, global states, and debugging.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Ordering and Consistent Cuts
Chapter 11 Detecting Termination and Deadlocks. Motivation – Diffusing computation Started by a special process, the environment environment sends messages.
Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms CS 249 Project Fall 2005 Wing Wong.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
Distributed Computing 5. Snapshot Shmuel Zaks ©
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.
On Reducing the Global State Graph for Verification of Distributed Computations Vijay K. Garg, Arindam Chakraborty Parallel and Distributed Systems Laboratory.
Issues with Clocks. Context The tree correction protocol was based on the idea of local detection and correction. Protocols of this type are complex to.
Lecture 6-1 Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013 Indranil Gupta (Indy) September 12, 2013 Lecture 6 Global Snapshots Reading:
1 Distributed Process Management Chapter Distributed Global States Operating system cannot know the current state of all process in the distributed.
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?
The Complexity of Distributed Algorithms. Common measures Space complexity How much space is needed per process to run an algorithm? (measured in terms.
1 Efficient Dependency Tracking for Relevant Events in Shared Memory Systems Anurag Agarwal Vijay K. Garg
“Virtual Time and Global States of Distributed Systems”
Distributed Systems Fall 2010 Logical time, global states, and debugging.
Program correctness The State-transition model A global states S  s 0 x s 1 x … x s m {s k = set of local states of process k} S0  S1  S2  Each state.
Distributed Snapshot. One-dollar bank Let a $1 coin circulate in a network of a million banks. How can someone count the total $ in circulation? If not.
Chapter 7 April 28 Network Flow.
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.
Parallel and Distributed Systems Laboratory Paradise: A Toolkit for Building Reliable Concurrent Systems Trace Verification for Parallel Systems Vijay.
Chapter 7 May 3 Ford-Fulkerson algorithm Step-by-step walk through of an example Worst-case number of augmentations Edmunds-Karp modification Time complexity.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
1 Chapter 11 Global Properties (Distributed Termination)
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.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
Parallel and Distributed Systems Laboratory Paradise: A Toolkit for Building Reliable Concurrent Systems On Building Reliable Concurrent Systems Vijay.
Distributed Systems Lecture 6 Global states and snapshots 1.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Consistent cut A cut is a set of events.
Lecture 3: State, Detection
Lecture 3: State, Detection
Distributed Snapshots & Termination detection
Distributed Snapshot.
Distributed Snapshot.
Time And Global Clocks CMPT 431.
Chapter 5 (through section 5.4)
ITEC452 Distributed Computing Lecture 8 Distributed Snapshot
Distributed Snapshot.
Distributed algorithms
CIS825 Lecture 5 1.
Consistent cut If this is not true, then the cut is inconsistent
Distributed Snapshot.
Presentation transcript:

Chapter 10 Global Properties

Unstable Predicate Detection A predicate is stable if, once it becomes true it remains true Snapshot algorithm is not useful for detection of global properties:  Not applicable for unstable predicates  Can not compute the least global state that satisfies a given predicate  Excessive overhead if frequency of snapshots is high

Predicates Any predicate B constructed from local predicates using boolean connectives can be written in a disjunctive normal form i.e. where q 1, q 2, …,q n are conjunctive predicates E.g. : x = y (where x and y are boolean) can be written as

Weak Conjunctive Predicate (WCP) A Weak Conjunctive Predicate (WCP) is true iff there exists a consistent global cut in which all the conjuncts are true Disjunctive predicates are easy to detect Given an algorithm for detecting WCP we can detect any predicate B constructed from local predicates using boolean connectives

WCP Algorithm outline Non-Checker process  Maintains a vector clock  Sends vector clock to checker process when predicate becomes true

WCP Algorithm outline Checker process  Maintains a separate queue for each non-checker process  Maintain a cut[1..N] (array of states of the processes)  If state cut[i] ! cut[j], then cut[i] = queue i.getNext()  Repeat above statement till all states in cut[ ] are concurrent  cut[ ] is the least CGS for which the predicate holds

WCP Detection - Checker Process

Overhead Analysis n: number of processes involved m: max number of messages sent or received by any process Space :  Each local snapshot : O(n)  At most O(mn) local snapshots  O(n 2 m) total space Time: n 2 m comparisons  O(n 2 m)

Is the time complexity optimal ? Lemma :  Let there be n elements in a set S. Any algorithm that determines whether all elements are incomparable must make at least n(n-1)/2 comparisons.

Is the time complexity optimal ? Theorem  Let S be any partially ordered finite set of size mn. We are given a decomposition of S into n sets P 0 … P n-1 such that P i is a chain of size m. Any algorithm that determines whether there exists an anti-chain of size n must make at least mn(n- 1)/2 comparisons Adversary algorithm

A Token based algorithm for WCP Monitor process runs on each node along with the application Monitor processes pass the token to each other Token stores candidate cut and information to determine if it is consistent Monitor Process Application Process Node P i

A Token based algorithm for WCP A token is sent to a process P i when current state from P i happened before some other state in the candidate cut Once the monitor process for P i has eliminated the current state  receive a new state from the application process  check for consistency conditions again. This process is repeated until  all states are eliminated from some process P i or  the WCP is detected.

A Token based algorithm for WCP Token consists of two vectors G and color  G represents the candidate global cut G[i] = k indicates that state (i,k) is part of the current cut Invariant: G[i] = k implies that any global cut C with state (i,s) 2 C and s < k cannot satisfy the WCP  color indicates which states have been eliminated If color[i]=red, then state (i,G[i]) has been eliminated and can never satisfy the global predicate

A Token based algorithm for WCP

Applications Distributed debugging Detect a bad condition  E.g. There is no leader,i.e., P 1 does not have a token and P 2 does not have a token and... P n does not have a token