Verification of clock synchronization algorithm
(Original Welch-Lynch algorithm and adaptation to TTA)
Christian Müller cm@wjpserver.cs.uni-sb.de Saarland University
- 7. October 2005
1/33
Verification of clock synchronization algorithm (Original - - PowerPoint PPT Presentation
Verification of clock synchronization algorithm (Original Welch-Lynch algorithm and adaptation to TTA) Christian Mller cm@wjpserver.cs.uni-sb.de Saarland University 7. October 2005 1/33 Overvie view Clock synchronization in general
(Original Welch-Lynch algorithm and adaptation to TTA)
1/33
2/33
3/33
– hardware clocks are not synchronous – hardware clocks drift with different frequency – message delivery delay varies – software processes, which access the
➔ messages could be discrepant (in the worst case:
4/33
– a fault tolerant algorithm for clock
– intended for a fully connected network of n
– will be executed periodically at the same
– requires at least n² messages between two
5/33
6/33
7/33
– the drift from the real time of all clock is
– there are maximal f < n/3 faulty clocks – in the beginning all nonfaulty clocks are
– message delivery delay is [δ-ε,δ+ε]
1−ρ≤d H it dt ≤1ρ
8/33
– PCp is the physical clock of a node p – CORRp is the computed correction of PCp – VCp is the (virtual) local clock of a node p – VCp(t) = PCp(t) + CORRp(t)
➔ VCp(t) returns the local time T of node p at the real
9/33
– Agreement: all the non-faulty processes p
– Validity: the clocks of non-faulty processes
10/33
t0 t1 t2 t3 t4 0,5 1 1,5 2 2,5 3 3,5 4
slope = 1 slope = 1+ρ slope = 1-ρ
real time local time
11/33
p);
initialization
12/33
– the last SYNC message in the current round
tp := is th real time when the round starts β := maximal clock drift in real time δ + ε := maximal message delay
13/33
– the last SYNC message in the current round
– VC(tp + β +
➔ Δ ≥ (1+ )( + + )
14/33
– for p not to miss the next round, T+P must be
➔ P ≥ Δ + ADJmax
15/33
16/33
– although the algorithm is fairly simple, its
– to make the proof presentable, we abstract
– for simplicity we assume that broadcasting a
17/33
– To examine two non-faulty clocks before a
– Cp(t) = cfn(ARRp) – Cq(t) (analogous)
18/33
0 tsync tsync+1 | |
19/33
– they are sorted from smallest to largest – mARRp is a subset of ARRp – mARRp contains all the non-faulty clocks and is
– length(mARRp) ≥ 2f + 1
ARRp: mARRp:
20/33
➔ i ≤ f+1
➔ analogous for M1 ≤ Af+1
➔ analogous for
ARRp: mARRp:
21/33
– since m ≥ 2f+1, such a k exists.
ARRp: mARRp:
22/33
M 1M k 2 ≤ A f 1An− f 2 ≤M kM m 2
➔ (M1 + Mk)/2 ≤ cfn(ARRp) ≤ (Mk + Mm)/2 ➔ (M1 + Mk)/2 ≤ cfn(ARRq) ≤ (Mk + Mm)/2 ➔ the cfn-function returns a result depending
23/33
24/33
t0 t1 t2 t3 t4 0,5 1 1,5 2 2,5 3 3,5 4
slope = 1 slope = 1+ρ slope = 1-ρ faulty clock11 faulty clock 2
real time local time
25/33
i+1-ti) ≤ Ti+1-Ti ≤ (1- )(t
i+1-ti)
26/33
– our model is very abstract and not practical – we neglected message delivery delays and
27/33
– k = 1 with k > 3f – some changes in the fault assumptions – TTA doesn't consider all accurate clocks,
– this accurate clocks are choosen by the
➔ so have all non-faulty nodes the same members at
28/33
– in TTA bus topology and in a Flexray system
29/33
– each node maintains a push-down stack of
– is a SYF-message arrive and it is valid (it
– when time, synchronize the local clock using
30/33
SYF-message
e.g. this SYF-message was expected at time 5 but sended at time 8
5 – 8 = -3
31/33
– communication in TTA is time-triggered
– each node knows beforehand at wich time a
➔ difference between the expected time and
32/33
– in Flexray and TTA each node starts a
➔ the duration of one round P have to be changed
33/33