[ntp:questions] Kernel PLL, microkernel and the simulator.

brian.utterback at gmail.com brian.utterback at gmail.com
Sun Jul 20 15:21:31 UTC 2008


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
1024.

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 mailing list