Algorithms for Extracting Timeliness Graphs

24
Algorithms for Extracting Timeliness Graphs Carole Delporte, LIAFA, Univ. D. Diderot Stéphane Devismes, VERIMAG, Univ. J. Fourier Hugues Fauconnier, LIAFA, Univ. D. Diderot Mikel Larrea, University of the Basque Country Delporte-Gallet et al 1 SIROCCO'2010

description

Algorithms for Extracting Timeliness Graphs. Carole Delporte, LIAFA, Univ. D. Diderot Stéphane Devismes, VERIMAG, Univ. J. Fourier Hugues Fauconnier, LIAFA, Univ. D. Diderot Mikel Larrea, University of the Basque Country. Goals. (In partially synchronous distributed systems) - PowerPoint PPT Presentation

Transcript of Algorithms for Extracting Timeliness Graphs

Page 1: Algorithms for Extracting Timeliness Graphs

Algorithms for Extracting Timeliness Graphs

Carole Delporte, LIAFA, Univ. D. DiderotStéphane Devismes, VERIMAG, Univ. J. FourierHugues Fauconnier, LIAFA, Univ. D. DiderotMikel Larrea, University of the Basque Country

Delporte-Gallet et al 1SIROCCO'2010

Page 2: Algorithms for Extracting Timeliness Graphs

Goals

(In partially synchronous distributed systems)

How to determine the timeliness relations between processes? That is, communication from p to q within a

bounded delay

Determine? Eventually all processes agrees on the

timeliness of some links

Delporte-Gallet et al 2SIROCCO'2010

Page 3: Algorithms for Extracting Timeliness Graphs

Why?

For example (leader) There exists a process that

communicates in a timely way with all others -> leader election

(tree) There exist timely paths from p to every other process -> routing

(ring) There exists at least one timely ring linking all correct -> ring overlay

Delporte-Gallet et al 3SIROCCO'2010

Page 4: Algorithms for Extracting Timeliness Graphs

Also…

Timeliness is often used to determine correct processes(p timely received messages from q => q is

correct)

Leader -> Ω Tree-Routing -> The source is correct (Ω) Ring -> exactly all correct processes (◊ P)

(Failure Detectors)

Delporte-Gallet et al 4SIROCCO'2010

Page 5: Algorithms for Extracting Timeliness Graphs

Context… Processes : timely

(bounds on the time to execute a step -> accurately measure the time)

Some process crashes (correct / faulty)

Communication: fully connected graph Communication: by messages

Reliable links (no message loss)

Delporte-Gallet et al 5SIROCCO'2010

Page 6: Algorithms for Extracting Timeliness Graphs

Timeliness

The link (p,q) is timely: There exists an unknown bound D: any

message sent at time t by p cannot be received by q after time t+D

(if (p,q) is not timely, the communication delays from p to q are unbounded)

(there exists an unknown bound eventually there exists an unknown bound)

(Timeliness is a property that is defined to a given run)

Delporte-Gallet et al 6SIROCCO'2010

Page 7: Algorithms for Extracting Timeliness Graphs

Recalls

In asynchronous systems, no hypothesis on the link timeliness

In synchronous systems, all links are timely

Asynchronous <-> no consensus Synchronous <-> consensus Partially synchronous: Some links are

timely

Delporte-Gallet et al 7SIROCCO'2010

Page 8: Algorithms for Extracting Timeliness Graphs

Partially synchronous systems:

Examples: There exists a process having all its

outgoing links timely There exists a time from which all links

are timely Remark: in both cases, consensus is

possible (Ω can be implemented in the first one and

◊ P in the second one)

Delporte-Gallet et al 8SIROCCO'2010

Page 9: Algorithms for Extracting Timeliness Graphs

Timeliness:

The timeliness graph of a given run r: T(r)=<S,E> Nodes: correct processes Oriented edges: (p,q) is an edge iff the

link from p to q is timely in r

Delporte-Gallet et al 9SIROCCO'2010

Page 10: Algorithms for Extracting Timeliness Graphs

Basic tool: Watchdog q can test the link from p to q:

p regularly sends "Alive” in the link (p,q) q loads a timer of period T, if it does not receive "ALIVE”

from p within T time, q blames (p,q) and increases T

If the link (p,q) is timely (and p correct) eventually, T is sufficiently large so that q never more blame (p,q)

If the link (p,q) is not timely (and q correct), q will blame (p,q) infinitely often

Timely link Finite number of blaming (assumption: FIFO links)

Delporte-Gallet et al 10SIROCCO'2010

Page 11: Algorithms for Extracting Timeliness Graphs

Systems

G=<S,E> is compatible a with T(r)=<Sr,Er> (1) S=Sr

(2) All edges of E are timely in T(r).

A system X is defined by a set of timeliness graphs: Let R(X) the set of run of X:

r is in R(X) if there exists G in X that is compatible with T(r)

Delporte-Gallet et al 11SIROCCO'2010

Page 12: Algorithms for Extracting Timeliness Graphs

Some systems…

ASYNC: G=<S,> COMPLETE: all complete graphs STAR: all star graphs TREE: all out-trees RING: all rings SC: all strongly connected graphs PAIR: all cycles of two elements

Delporte-Gallet et al 12SIROCCO'2010

Page 13: Algorithms for Extracting Timeliness Graphs

Extraction

Examples: We want (when it is possible) To build a star To build a (out-) tree To build a ring

Moreover, we want: Only timely links All nodes must be (or almost be) correct

processesDelporte-Gallet et al 13SIROCCO'2010

Page 14: Algorithms for Extracting Timeliness Graphs

Almost?

In the general case, it is not possible to ensure that all processes of the extracted graph are correct… (We can just evaluate the timeliness to know if a

process is correct)

However we can evaluate: if G satisfies

G contains at least all the corrects We don’t know G[Correct] but…

Delporte-Gallet et al 14SIROCCO'2010

Page 15: Algorithms for Extracting Timeliness Graphs

Di-cut (directed cut)

In the extracted graph, if there is no link outgoing from p supposed to be timely (e.g. p is a sink), no process can determine if p is correct… In the same way, if all the links from p lead to faulty processes.

(X,Y) is a dicut of G=<S,E> iff (X,Y) is a partition of S such that there is no (directed) link from Y to X

Delporte-Gallet et al 15SIROCCO'2010

Page 16: Algorithms for Extracting Timeliness Graphs

Almost?

In the general case, it is not possible to ensure that all nodes of the extracted graph are correct…

However, we can ensure that: the extracted graph G satisfies

G contains at least all the correct processes G[Correct] is either G or (Correct, F) is a

dicut of G where F is a subset of faulty processes

Delporte-Gallet et al 16SIROCCO'2010

Page 17: Algorithms for Extracting Timeliness Graphs

Extraction:

Algorithm for extracting a graph from X Each p has a variable Gp, for all run r

there exists G in X: Convergence: for all correct process, there

exists a time t from which Gp=G

Compatibility: G[Correct(r)] is compatible with T(r)

Closure: G[Correct(r)] is a dicut reduction of G (or G itself)

Delporte-Gallet et al 17SIROCCO'2010

Page 18: Algorithms for Extracting Timeliness Graphs

Some results:

If G is extracted, (p,q) is an edge of G, and q is correct, then p is correct.

If p0,…,pm such that p0 and pm are correct is a path of the extracted graph, then for 0≤i<m, (pi,pi+1) is timely and all pi are correct (in particular, we obtain a route from p0 to

pm that only contains timely links)

If G is strongly connected, G[correct]=G.Delporte-Gallet et al 18SIROCCO'2010

Page 19: Algorithms for Extracting Timeliness Graphs

Main result:

If a family of graph X is closed by dicut reduction (for G in X and (A,B) a dicut of G, we have G[A] is in X), then we can always extract a graph from X.

If every graph of X is strongly connected, then the extracted graph G satisfies G[Correct]=G

Delporte-Gallet et al 19SIROCCO'2010

Page 20: Algorithms for Extracting Timeliness Graphs

Example In STAR, we extract a star graph whose center is a

correct process (Ω)

In TREE, we extract a out-tree whose root is a correct process p0 and such that for all correct process q, there exists a tree-path from p0 to q that only contains correct processes and timely links

In RING, we extract a ring among all correct processes and containing only timely links

(In contrast, for PAIR, there is no extraction algorithm)

Delporte-Gallet et al 20SIROCCO'2010

Page 21: Algorithms for Extracting Timeliness Graphs

Principles of the algorithm Watch and punish

Regularly test (p,q): (p,q) timely q blames (p,q) only a finite number of time

For each (p,q)-blaming, punish all G containing (p,q): increase the counter of G

For each process p, punish all G that does not contain p (reliably) broadcast the counters Choose the graph with the smallest counter value

Any graph whose all links are timely and containing all correct in the run is only finitely blamed -> finite counter

Any graph having at least one asynchronous link or that misses some correct will be blamed infinitely often -> infinite counter

Delporte-Gallet et al 21SIROCCO'2010

Page 22: Algorithms for Extracting Timeliness Graphs

Moreover…

Enhancement: If there exists a spanning out-tree in all

graph of X, eventually the messages are only sent through the links of the extracted graph

Examples: STAR, TREE, RING, O(n) links are used

(instead of O(n2))

Delporte-Gallet et al 22SIROCCO'2010

Page 23: Algorithms for Extracting Timeliness Graphs

Conclusion and perspectives

Timeliness <-> failures Timeliness allows to detect failures (the

only way?) Timeliness is useful (independently of

failures detection)

Algorithm Complexity… Impossibility results

Delporte-Gallet et al 23SIROCCO'2010

Page 24: Algorithms for Extracting Timeliness Graphs

Delporte-Gallet et al SIROCCO'2010 24