The Timed Message Passing model (TMP)
- Each network node has a local hardware clock H -
- There is a bound d on end-to-end message transmission and processing time
- We defined logical clocks and skew
- Uncertainties: hardware clock drift, and
message transmission time
2
Computer Time
H, L
UTC time, t
Perfect time
3
Computer Time, H
UTC time, t
Perfect time
Hardware clock envelope
skew
4
Computer Time, H
UTC time, t
Perfect time
Our Model
(drift faster than real time)
skew
5
Computer Time, H
External reference time, t (linear bound to UTC) Perfect time
Alternative view skew
Accumulated Skew ≤ �(� -1)
6
Computer Time, L
External reference time, t
Minimal
linear bound on Logical clock rate Logical clock
Synchronization algorithm Intend to maintain
a bounded Skew
It can slow down logical clocks
(even slower than minimal H)
MAX algorithm – APOLOGY
L a (t 4 ) – L b (t 4 ) ?
RECALL: the difference between the values of the hardware clocks of v and w may increase by �(� -1)
t 4 t 2 t 3
t 1
a b c
L c L b
L a
d d
�d L b (t 4 ) = L b (t 2 ) + L= L a (t 1 ) + L L a (t 4 ) = L a (t 1 ) + L’+ � d
L a (t 4 ) - L b (t 4 ) ≤ T (� -1) + � d T
L
L a (t 4 ) - L b (t 4 ) ≤ L’- L+ � d L a L b
L’
MAX algorithm – maximum clock dif
L a (t 4 ) – L b (t 4 ) ? t 4 t 2 t 3
t 1 L a
a b c
L c L b
L a
d d
L b
�d L b (t 4 ) = L b (t 2 ) + L= L a (t 1 ) + L L a (t 4 ) = L a (t 1 ) + L’ + � d
L a (t 4 ) - L b (t 4 ) ≤ T (� -1) + � d L’
L
L a (t 4 ) - L b (t 4 ) ≤ L’ - L+ � d
L a (t 4 ) - L x (t 4 ) ≤ T (� -1) + � dD
T
MAX algorithm – maximum clock dif
t 4 t 2 t 3
t 1 L a
a b c
L c L b
L a
d d
L b
�d L’
L
L a (t 4 ) - L x (t 4 ) ≤ (T+dD) (� -1) + dD T
L a (t 4 ) - L x (t 4 ) ≤ T (� -1) + � dD
MAX algorithm – First Synchronization
L a (t 4 ) – L b (t 4 ) ? t 4 t 0
t 3 t 0
L a L b
d
L a (t 0 ) - L b (t 0 ) = H
L a (t 4 ) - L b (t 4 ) ≤ (T+d) (� -1) + H
T L
L a (t 4 ) - L x (t 4 ) ≤ (T+dD) (� -1) + H
increase by �(� -1)
The Timed Message Passing model (TMP)
- Each network node has a local hardware clock H -
- There is a bound d on end-to-end message transmission and processing time
- We defined logical clocks and skew
- Uncertainties: hardware clock drift, and
message transmission time
The Timed Message Passing model (TMP)
- Each network node has a local hardware clock H -
- There is a bound d on end-to-end message transmission and processing time
- We defined logical clocks and skew
- Uncertainties: hardware clock drift, and message transmission time
- Is there an algorithm than can obtain a
constant skew or O(d) skew?
13
w v
t
1t
3t
2If t 3 -t 1 =2d we can synchronize the logical clocks L w =L v (t 2 )+d.
If t 3 -t 1 =d we face a problem
14
w v
t
1t
3t
2If t 3 -t 1 =d we face the basic uncertainty.
d
t
2t
215
w v
t
1t
3If t 3 -t 1 =dD we face the basic uncertainty.
dD
The basic uncertainty – given no drift hardware clocks
16w
v 7
7
8
8
9
9
10
10
11
11
w
v 7
7
8
8
9
9
10
10
11
11
w
v 7
7
8
8
9
9
10
10
11
11
All events take place
at the same clock time
in all 3 scenarios
A State Machine in TSM
Inputs / messages
messages outputs
state
The sequence of messages and outputs depends solely on 1. the initial state and initial input
2. the sequence of messages and inputs it receives 3. hardware clock readings
H
18
Computer Time, L
External reference time, t
Lowest rate of progress
c �
Lower bound proof
Assume existence of a logical clock algorithm that satisfies the amortized minimum progress.
In the presentation we assume that the uncertainty is d
(in the text it is u ≤ d)
20
w v
t
1t 1 +x
Timely behavior: drift=0, message transmission=d/2 Scenario 0. H=0, and timely behavior
D
H v =x
Lower bound proof – 1st step
By playing with drifts and message delays we start from all H=0 and
introduce a sequence of intermediate scenarios that
step by step, after some time x, reach a point where one of the nodes have hardware clock value of
H v =x+D(d - ), �
without any node noticing the difference among any two consecutive steps.
All other clocks equal x.
View after time x.
22w v w
v H
v=x+D(d/2- ) �
w v
Scenario v
Scenario w Scenario 0
H
w=x H
v=x
H
w=x H
v=x
H
w=x+D(d/2- ) �
Lower bound proof – 2nd step
We have no idea how the synchronization algorithm adjusts the logical clocks in these scenarios.
• We claim that in any synchronization algorithm, at some time after time x, the sum of
the increase in logical clock value of w in scenario v, and
the increase in logical clock value of v in scenario w need to satisfy
� L v + L � w ≥ D(d - ) � 3�
• We assume to the contrary and introduce sequence of
steps with a slower rate ’≤ that eventually reach a � �
contradiction
24