16
Hwajung Lee

Hwajung Lee. Technique for spontaneous healing. Forward error recovery. Guarantees eventual safety following failures. Feasibility demonstrated

Embed Size (px)

DESCRIPTION

Recover from any initial configuration to a legitimate configuration in a bounded number of steps, as long as the codes are not corrupted.

Citation preview

Page 1: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Hwajung Lee

Page 2: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Technique for spontaneous healing. Forward error recovery. Guarantees eventual safety following

failures.

Feasibility demonstrated by Dijkstra (CACM 74)

Page 3: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Recover from any initial configuration to a legitimate configuration in a bounded number of steps, as long as the codes are not corrupted.

Page 4: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Transient failures perturb the global state. The ability to spontaneously recover from any initial state implies that no initialization is ever required.

Such systems can be deployed ad hoc, and are guaranteed to function properly in bounded time

Page 5: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Self-stabilizing systems exhibits non-masking fault-tolerance. It satisfies the following two criteria fault

1. Convergence2. Closure

Not L Lconvergence

closure

Page 6: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

System behavior spontaneously changes when the environment changes

A traffic control system

Thus the legal configuration is L = (E L1) (E L2)

Environment E = morning (0) / afternoon (1)

Let the morning invariant be L1 andThe afternoon invariant be L2

Page 7: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

01 62 4 753

N-1

Consider a unidirectional ring of processes. In the legal configuration, exactly one tokenwill circulate in the network

Page 8: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

0

{Process 0} do x[0] = x[N-1] x[0] := x[0] + 1 od{Process j > 0} do x[j] ≠ x[j -1] x[j] := x[j-1] od

The state of process j is x[j] {0, 1, 2, K-1}

(TOKEN = ENABLED GUARD)

Hand -execute this first, before reading further.Start the system from an arbitrary initial configuration

Page 9: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Why will it work?As long as K > N, there is at least one value x (O≤ x ≤K-1) that is NOT the initial state of any node (pigeonhole principle)

• There is no deadlock• Number of tokens never increases (closure)• Processes 1..N-1 acquire their states from their left side• Eventually process 0 attains the state x• Thereafter in N-1 steps, all processes attain the state x.• This is a legal configuration (only process 0 has a token) (convergence).• So the system stabilizes.

Page 10: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Given a connected graph G = (V,E) and a root r, design an algorithm for maintaining a spanning tree in presence of transient failures that may corrupt the local states of processes.

Let n = |V|

Page 11: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Each process i has two variables:L(i) = Distance from the root via tree edgesP(i) = parent of process iN(i) denotes the neighbors of i

By definition L(r) = 0, and P(r) is undefined. 0 ≤ L(i) ≤ n. In a legal state

i V: i ≠ r:: L(i) ≠ n and L(i) = L(P(i)) +1.

Page 12: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

0

1

2

5

4

3

0

1

2

5

4

3

1

2

3 4

5

P(2) is corrupted

Page 13: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

do (L(i) ≠ n) (L(i) ≠ L(P(i)) +1) (L(P(i)) ≠ n)

L(i) :=L(P(i)) +1 (0)

(L(i) n) (L(P(i)) =n) L(i):=n (1) (L(i) =n) (k N(i):L(k) < n-1)

L(i) :=L(k)+1; P(i):=k (2)

od

Page 14: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Define an edge from i to P(i) to be well-formed, when L(i) ≠ n, L(P(i) ≠ n and L(i) = L(P(i)) +1. In any configuration, the well-formed edges form a spanning forest. Delete all edges that are not well-formed. Designate each tree T(k) in the forest by the lowest value of L in it.

Page 15: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

In the sample graph shown earlier.T(0) = {0, 1}T(2) = {2, 3, 4, 5}

Let F(k) denote the number of T(k) in the forest.Define a tuple F= (F(0), F(1), F(2) …, F(n)). For the sample graph, F = (1, 0, 1, 0, 0, 0) afternode 2 has a transient failure.

Page 16: Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated

Minimum F = (1,0,0,0,0,0) {legal configuration}

Maximum F = (1, n-1, 0, 0, 0, 0).

With each action of the algorithm, F decreases

lexicographically. Verify the claim!

This proves that eventually F becomes (1,0,0,0,0,0)

and the spanning tree stabilizes.

What is the time complexity of this algorithm?