Chapter 10 Global Properties - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 10 Global Properties

Description:

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 ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 16
Provided by: Vin79
Category:

less

Transcript and Presenter's Notes

Title: Chapter 10 Global Properties


1
Chapter 10Global Properties
2
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

3
Predicates
  • Any predicate B constructed from local predicates
    using boolean connectives can be written in a
    disjunctive normal form i.e.
  • where q1, q2, ,qn are conjunctive predicates
  • E.g. x y (where x and y are boolean) can be
    written as

4
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

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

6
WCP Algorithm outline
  • Checker process
  • Maintains a separate queue for each non-checker
    process
  • Maintain a cut1..N (array of states of the
    processes)
  • If state cuti ! cutj, then cuti
    queuei.getNext()
  • Repeat above statement till all states in cut
    are concurrent
  • cut is the least CGS for which the predicate
    holds

7
WCP Detection - Checker Process
8
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(n2m) total space
  • Time n2m comparisons
  • O(n2m)

9
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.

10
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 P0 Pn-1 such that Pi 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
11
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

12
A Token based algorithm for WCP
  • A token is sent to a process Pi when current
    state from Pi happened before some other state in
    the candidate cut
  • Once the monitor process for Pi 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 Pi or
  • the WCP is detected.

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

14
A Token based algorithm for WCP
15
Applications
  • Distributed debugging
  • Detect a bad condition
  • E.g. There is no leader ,i.e.,
  • P1 does not have a token and
  • P2 does not have a token and
  • . . .
  • Pn does not have a token
Write a Comment
User Comments (0)
About PowerShow.com