Gradient Clock Synchronization
max {v,w}ϵE |L v -L w | << max v,wϵV |L v -L w |
Today: GCS Algorithm with log. Skew
Theorem
For any μ > θ-1, there is an algorithm such that dH/dt ≤ dL/dt ≤ (1+μ)dH/dt
and the local skew is O((u+μd) log
σD), where
σ = μ/(θ-1).
GCS: General Approach
repeat:
1. measure skews
(to neighbors)
GCS: General Approach
repeat:
1. measure skews
(to neighbors)
2. determine range
GCS: General Approach
repeat:
1. measure skews
(to neighbors)
2. determine range
3. find midpoint
GCS: Naive Averaging Fails
repeat:
1. measure skews (to neighbors) 2. determine range 3. find midpoint
4. if behind, run faster
(else like HW clock)
GCS: Naive Averaging Fails
repeat:
1. measure skews (to neighbors) 2. determine range 3. find midpoint
4. if behind, run faster
(else like HW clock)
GCS: Naive Averaging Fails
repeat:
1. measure skews (to neighbors) 2. determine range 3. find midpoint
4. if behind, run faster
(else like HW clock)
GCS: Naive Averaging Fails
repeat:
1. measure skews (to neighbors) 2. determine range 3. find midpoint
4. if behind, run faster
(else like HW clock)
GCS: Naive Averaging Fails
problem:
Measurements
are not perfect!
GCS: Naive Averaging Fails
problem:
Measurements are not perfect!
This blurs the line
between fast and slow.
GCS: Naive Averaging Fails
problem:
Measurements are not perfect!
This blurs the line
between fast and slow.
=> system might not respond to build-up
of skew!
GCS Algorithm
idea:
discretize skews and round conservatively
=> local & limited
response to skews
GCS Algorithm
idea:
discretize skews and round conservatively
=> local & limited
response to skews
aggressive averaging
GCS Algorithm
idea:
discretize skews and round conservatively
=> local & limited
response to skews
aggressive averaging
GCS Algorithm
idea:
discretize skews and round conservatively
=> local & limited
response to skews
conservative averaging
GCS Algorithm
idea:
discretize skews and round conservatively
=> local & limited
response to skews
conservative averaging
GCS Algorithm
idea:
discretize skews and round conservatively
=> local & limited
response to skews 2κ = “height of stairs”
δ = side of square
Computing Clock Estimates
breakout session:
What‘s δ (asymptotically)?
GCS Analysis: Potential Function
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
L
v(t) Ψ
vs(t)
L
w(t)
GCS Analysis: Potential Function
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
L
v(t) Ψ
vs(t)
L
w(t)
leading node
GCS Analysis: Potential Function
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
L
v(t) Ψ
vs(t)
L
w(t)
≤ (2s-1)κ
≥ (2s-1)κ
GCS Analysis: Potential Function
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
- estimates are ≤ actual clock values
=> slow mode trigger holds for all leading nodes
L
v(t) Ψ
vs(t)
L
w(t)
≤ (2s-1)κ
≥ (2s-1)κ
GCS Analysis: Potential Function
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
- estimates are ≤ actual clock values
=> slow mode trigger holds for all leading nodes
=> Ψ
vs(t‘) ≤ Ψ
vs(t) + θ(t‘ – t) – (L
v(t‘) – L
v(t))
L
v(t) Ψ
vs(t)
L
w(t)
≤ (2s-1)κ
≥ (2s-1)κ
GCS Analysis: Catching Up
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
Ψ
s(t) = max
vϵV{Ψ
vs(t)}
Lemma:
For times
t‘ ≥ t + Ψ
s-1(t)/μ we have
L
v(t‘) - L
v(t) ≥ t‘ – t + Ψ
vs(t).
GCS Analysis: Catching Up
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
Ψ
s(t) = max
vϵV{Ψ
vs(t)}
fix t and w that maximizes Ψ
vs(t), and set
f
x(t‘) = L
w(t) + t‘ – t – L
x(t‘) – (2s – 2)κ dist(v,w) f(t‘) = max
xϵV{f
x(t‘)}
L
w(t)
f (t) L
x(t)
L
v(t)
trailing node
GCS Analysis: Catching Up
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
Ψ
s(t) = max
vϵV{Ψ
vs(t)}
fix t and w that maximizes Ψ
vs(t), and set
f
x(t‘) = L
w(t) + t‘ – t – L
x(t‘) – (2s – 2)κ dist(v,w) f(t‘) = max
xϵV{f
x(t‘)}
L
w(t)
f (t) L
x(t)
L
v(t)
GCS Analysis: Catching Up
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
Ψ
s(t) = max
vϵV{Ψ
vs(t)}
fix t and w that maximizes Ψ
vs(t), and set
f
x(t‘) = L
w(t) + t‘ – t – L
x(t‘) – (2s – 2)κ dist(v,w) f(t‘) = max
xϵV{f
x(t‘)}
Ψ
vs(t) ≤ f
v(t)
L
w(t)
f (t) L
x(t)
L
v(t)
GCS Analysis: Catching Up
Ψ
vs(t) = max
wϵV{L
w(t) – L
v(t) – (2s – 1)κ dist(v,w)}
Ψ
s(t) = max
vϵV{Ψ
vs(t)}
fix t and w that maximizes Ψ
vs(t), and set
f
x(t‘) = L
w(t) + t‘ – t – L
x(t‘) – (2s – 2)κ dist(v,w) f(t‘) = max
xϵV{f
x(t‘)}
Ψ
vs(t) ≤ f
v(t)
f(t‘) ≤ 0 => f
v(t‘) ≤ 0
=> L
v(t‘) – L
v(t) = t‘ – t + f
v(t) ≥ t‘ – t + Ψ
vs(t)
L
w(t)
f (t) L
x(t)
L
v(t)
GCS Analysis: Catching Up
f
x(t‘) = L
w(t) + t‘ – t – L
x(t‘) – (2s – 2)κ dist(v,w) f(t‘) = max
xϵV{f
x(t‘)}
sufficient to show:
t‘ ≥ t + Ψ
s-1(t)/μ
=> f(t‘) ≤ 0 L f (t’)
x
(t’)
GCS Analysis: Catching Up
f
x(t‘) = L
w(t) + t‘ – t – L
x(t‘) – (2s – 2)κ dist(v,w) f(t‘) = max
xϵV{f
x(t‘)}
sufficient to show:
t‘ ≥ t + Ψ
s-1(t)/μ
=> f(t‘) ≤ 0 L f (t’)
x
(t’)
≥ (2s-2)κ
≤ (2s-2)κ
GCS Analysis: Catching Up
f
x(t‘) = L
w(t) + t‘ – t – L
x(t‘) – (2s – 2)κ dist(v,w) f(t‘) = max
xϵV{f
x(t‘)}
sufficient to show:
t‘ ≥ t + Ψ
s-1(t)/μ
=> f(t‘) ≤ 0 L f (t’)
x