[ntp:questions] Kernel PLL, microkernel and the simulator.
David L. Mills
mills at udel.edu
Tue Jul 22 02:35:01 UTC 2008
The data actually used to update the clock can be as old as seven poll
periods old. This is the result of the clock filter and is expected.
However, the dynamics of the clock discipline, in particular the time
constant, are designed for this condition. Theory requires that the
sampling rate of the feedback loop be at least the Nyquist rate, which
is twice the bandwidth (inverse time constant) of the loop filter. In
particular, the sampling rate of the NTP loop, even using only every
seventh sample, is twice the Nyquist rate.
brian.utterback at gmail.com wrote:
> I am trying to track down some weird interactions in the Solaris
> kernel and the kernel PLL used by NTP. As such I have been looking
> very closely at the kernel simulator shipped with the microkernel
> reference code.
> As nearly as I can tell, it appears that the simulator calls the
> ntp_adjtime syscall simulation once every simulated 64 seconds with
> the current offset. With this system, we see the classic kernel PLL
> behavior, with the offset over-shooting and making a damping function
> until the correct frequency is achieved and the offset is zero. All
> well and good.
> The thing is, that isn't how NTP generally works. NTP may poll it's
> servers at regular intervals, but the times that it ends up calling
> ntp_adjtime are more irregular. Furthermore, because of storage of the
> last 8 offset values for each server, when ntp_adjtime is called, the
> offset may not even be the current offset. Instead it could be up to 8
> polling periods old, although I have not observed it be more than 5.
> But that is still up to 5 minutes old for a 64 second polling period,
> but could even be an hour and 1 half if the polling period goes up to
> Am I missing something here? Maybe I have misunderstood the simulator.
> Can anyone shed some light on this for me?
> Brian Utterback
> brian dot utterback at sun dot com
More information about the questions