Lockstep drift-free clock-synchronization step bounds #
This module proves a synchronous lockstep, drift-free R-round step towards the
((n - 1) / n) * (d_max - d_min) clock-synchronization bound of
Lundelius and Lynch, and is not the cited paper's general asynchronous
event-driven lower bound (which remains open in
#7202).
Over a complete network of n = Fintype.card P processes with unit-rate drift-free hardware clocks
and message transit delays in [d_min, d_max] (d_min ≤ d_max), we show for deterministic
fixed-R-round lockstep protocols (LockstepProtocol P K R) that the minimax worst-case clock
skew is ((n - 1) / n) * (d_max - d_min) (for n = 1, 0 ≤ γ holds trivially from |x - x| = 0):
- Lockstep lower-bound step (
lockstepClockSync_lower_bound): Forn = 1,0 ≤ γis immediate; forn ≥ 2, starting from(c₀, δ₀)withc₀ ≡ 0andδ₀ r i j = d_minfori ≤ j,d_maxfori > junder an enumerationP ≃ Fin n, applyingsyncOffset_shift_eqacross then - 1prefix shiftss_m i = ufori < m(u = d_max - d_min) keeps every shifted delay inside{d_min, d_max} ⊆ [d_min, d_max]. Summing then - 1adjacent bounds from the shifted executions together with the wrap-around bound from the base execution telescopes all protocol adjustments to zero, yielding(n - 1) * u ≤ n * γfor everyR-roundLockstepProtocol P K Rachieving skewγ. - 1-round lockstep averaging step (
lockstepClockAvg,lockstepClockAvg_achievesSkew): In 1 lockstep round, each process broadcasts at local clock reading0and sets its adjustment to the average ofestDiff d_min d_max p arrival qover allq : P. For anyp ≠ q, the two endpoint termsr = pandr = qcontribute error at mostu / 2each while the remainingn - 2terms contribute at mostueach, achieving lockstep skew((n - 1) / n) * u. - Lockstep minimax step (
exists_achievesLockstepSkew_iff): Across all round countsR, aLockstepProtocol P K Rachieves skewγif and only if((n - 1) / n) * (d_max - d_min) ≤ γ; within the lockstepR-round model, multi-round communication (R > 1) cannot improve upon 1-roundlockstepClockAvg.
Main definitions #
Cslib.Distributed.ClockSync.lockstepClockAvg: 1-round lockstep all-to-all midpoint-delay averaging protocol on drift-free clocks.
Main results #
Cslib.Distributed.ClockSync.lockstepClockSync_lower_bound: lockstepR-round step towards Lundelius and Lynch proving((Fintype.card P - 1 : K) / Fintype.card P) * (d_max - d_min) ≤ γ(#7202).Cslib.Distributed.ClockSync.lockstepClockAvg_achievesSkew:lockstepClockAvgachieves lockstep skew((Fintype.card P - 1 : K) / Fintype.card P) * (d_max - d_min)in 1 round.Cslib.Distributed.ClockSync.exists_achievesLockstepSkew_iff: minimax skew characterization within the synchronous lockstepR-round model (#7202).
References #
Prefix-shifted executions and the lockstep (1 - 1 / n) * (d_max - d_min) lower bound #
A synchronous lockstep, drift-free R-round step towards
Lundelius and Lynch, and not the cited asynchronous event-driven lower bound
(#7202): any deterministic R-round LockstepProtocol P K R achieving worst-case skew γ on a
nonempty finite complete network P against transit delays in [d_min, d_max] (d_min ≤ d_max)
satisfies ((Fintype.card P - 1 : K) / Fintype.card P) * (d_max - d_min) ≤ γ (for
Fintype.card P = 1, 0 ≤ γ follows immediately from |x - x| = 0; the prefix-shift telescoping
argument applies to 2 ≤ Fintype.card P).
1-round lockstep averaging upper bound and lockstep minimax step #
1-round lockstep all-to-all midpoint-delay averaging protocol on drift-free clocks (a
synchronous lockstep step after Lundelius and Lynch, #7202): every process
broadcasts at local clock reading 0 and sets its clock adjustment to
(∑ q : P, estDiff d_min d_max p v.lastArrival q) / |P|.
A synchronous lockstep, drift-free 1-round step after
Lundelius and Lynch, and not the cited asynchronous event-driven result
(#7202): lockstepClockAvg achieves worst-case lockstep clock skew
((Fintype.card P - 1 : K) / Fintype.card P) * (d_max - d_min) whenever d_min ≤ d_max.
A synchronous lockstep, drift-free R-round minimax step towards
Lundelius and Lynch, and not a characterization over asynchronous
event-driven protocols (#7202): there exists a round count R and a deterministic
LockstepProtocol P K R achieving worst-case clock skew γ on P against transit delays in
[d_min, d_max] (d_min ≤ d_max) if and only if
((Fintype.card P - 1 : K) / Fintype.card P) * (d_max - d_min) ≤ γ (trivial 0 ≤ γ for
Fintype.card P = 1; lockstepClockSync_lower_bound and lockstepClockAvg_achievesSkew for
2 ≤ Fintype.card P).