K. Mani Chandy @ Texas-Austin, Leslie Lamport @ Stanford
ACM Trans. on Computer System 1985
Problem: How to capture the global state of distributed system where only local states are available
|
|||||||||
What if the problem is reduced only to stable properties?
|
|||||||||
Deadlock detection & termination detection problems are special case of stable property detection problem! |
|||||||||
Also many distributed algorithms are structured as a seq. of phases, s.t.
|
A distributed system = directed graph G(V, E)
|
|||||||||||
Channel
|
|||||||||||
Process = state transition machine(St, Ev, a)
|
|||||||||||
An event is an atomic action and may change the state of the process and possibly the state of channel incident to the process |
|||||||||||
Event = (p, s, s', M, c)
|
|||||||||||
State of distributed system = ( {process_state}, {channel_state}, init_state )
|
|||||||||||
Valid event = (p, s, s', M, c): an event which can occur on the current system state
|
|||||||||||
Valid seq. of event: obvious |
|||||||||||
next_state of the system = next (system_state, event): obvious |
|||||||||||
A computation = a sequence of states of the system, starting from init_state |
Local state recoding
|
|||||||
The examples in this section show two anomalies of system states which are composed from local states taken at different times |
|||||||
Anomalies in these examples occur because:
|
|||||||
The condition for consistent system record
|
|||||||
Idea
|
Marker-Sending Rule:
|
|||||
Marker-Receiving Rule if I have not recorded my state { record my state with current status; record channel state as 'empty' } else { record channel state as the seq. of msgs received after I recorded my state and before I got the 'mark' msg } |
|||||
In short, each process records its own state and states of incoming channels! |
Receiving a marker make the receiver record its state! |
|
Periodic recording by all processes guarantees the termination |
|
If the graph is strongly connected, single process spontaneously recording its state guarantees the termination of the algorithm |
|
How to collect those local states to combine the global state is described in another paper |
Notation: S1 ->(e1)-> S2 = global state S1 goes to S2 by e1. Hence S1, ... Sn is equivalent to e1, ..., en. |
|||||||||
Recording local states (including propagating marker) takes time -> System keeps changing its real state while the recording is going on |
|||||||||
=> Recorded global state can be different from the state at time of record reading. Even worse,
|
|||||||||
However, it is proved that:
|
|||||||||
Theorem: There exists a computation e'1, e'2, ..., e'n, s.t.
|
Input: stable property y, i.e., a predicate |
|||
Output: Boolean variable definite s.t.,
|
|||
Note: |
y (init state) | definite | y (init state) -> definite |
F | T/F | T |
T | T | T |
T | F | F |
definite | y (final state) | definite -> y (final state) |
F | T/F | T |
T | T | T |
T | F | F |
Hence, definite = false means that y(initial state) = false, and definite = true means that y(final state) = true |
|||||
Algorithm is obvious from the definition of stability
|