Title: Time and Global State
1Time and Global State
- Jenhui Chen
- Office number 5990
- http//www.csie.cgu.edu.tw/jhchen
2Introduction
- Time is a quantity we often want to measure
accurately. - Algorithms that depend upon clock synchronization
have been developed for several problems in
distribution.
3Skew between computer clocks in a distributed
system
4Clock synchronization using a time server
5An example synchronization subnet in an NTP
implementation
6Figure 10.4Messages exchanged between a pair of
NTP peers
7Figure 10.5Events occurring at three processes
8Figure 10.6Lamport timestamps for the events
shown in Figure 10.5
9Figure 10.7Vector timestamps for the events
shown in Figure 10.5
10Figure 10.8Detecting global properties
11Figure 10.9Cuts
12Figure 10.10Chandy and Lamports snapshot
algorithm
Marker receiving rule for process pi On pis
receipt of a marker message over channel c if
(pi has not yet recorded its state) it records
its process state now records the state of c as
the empty set turns on recording of messages
arriving over other incoming channels else
pi records the state of c as the set of messages
it has received over c since it saved its
state. end if Marker sending rule for process
pi After pi has recorded its state, for each
outgoing channel c pi sends one marker message
over c (before it sends any other message over
c).
13Figure 10.11Two processes and their initial
states
14Figure 10.12The execution of the processes in
Figure 10.11
15Figure 10.13Reachability between states in the
snapshot algorithm
16Figure 10.14Vector timestamps and variable
values for the execution of Figure 10.9
17Figure 10.15The lattice of global states for the
execution of Figure 10.14
18Figure 10.16Algorithms to evaluate possibly f
and definitely f
19Figure 10.17Evaluating definitely f