[ntp:questions] Re: NTP adjustment mechanism

Ulrich Windl Ulrich.Windl at RZ.Uni-Regensburg.DE
Wed Sep 3 07:55:09 UTC 2003


ryandrk at hotmail.com (Drk Ryan) writes:

> Thanks for the reply Ulrich. Sorry if my question seemed a bit vague.
> I can understand that the values I mention would not be exact (due to
> 'fine wobble').
> But is the mechanism I describe essentially how NTP adjustments
> happen?

NTP knows it has to correct the system clock by some specific amount
per time interval. As a performance compromise, an  adjustment is
applied every timer interrupt, but is recalculated only one per
second. For nanosecond resolution, an adjustment is applied if the
amount to correct is more than one nanosecond. NTP accumulates
fractional nanoseconds however. Between timer interrupts the clock
runs uncorrected. (In Linux I tried to correct even
tick-interpolation)

Unless I'm wrong, visible clock adjustments can be as small as
0.001PPM (1 nanosecond) or almost 500PPM, but the correction will vary
rather smoothly than "jumpy" (no 100PPM jumps).

Download the "nanokernel" for an example implementation.

Regards,
Ulrich



More information about the questions mailing list