[ntp:questions] drift modeling question
david at ex.djwhome.demon.co.uk.invalid
Sun Jul 13 11:34:17 UTC 2008
Hal Murray wrote:
> Most PCs have 2 xtals. One at 14.xxx MHz (cheap, 4X color burst)
> that drives the CPU and most motherboard logic through a magic clock
> generator (PLL) chip, and another that is a 32 KHz watch crystal for
> keeping time when the CPU is off. The latter also makes interrupts
> for the scheduler.
Historically interrupts from the 32kHz clock have not been used, except,
possibly, in powered down states to initiate a restart from suspend or
hibernate. It is possible that has changed very recently, but they
certainly weren't used historically.
> I had the temperature probe on the 14 MHz xtal. It didn't work very well.
> I was assuming that the system used something like a cycle counter
> (TSC) for timekeeping. That has troubles in multi-CPU systems.
I think the most common way of doing timekeeping at the 1ms and higher
level is to use the counter timer, which is driven from a signal divided
down to approximately 1MHz. TSC is mainly used to interpolate between
ticks or to detect missed ticks.
> The code I was actually running used the timer interrupts for
> timekeeping and the TSC to interpolate between ticks.
but note that the timer interrupts are not based on the 32kHz
oscillator, in the typical system.
More information about the questions