-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


The Wednesday 2007-12-05 at 22:48 +0100, Theo v. Werkhoven wrote:

don't know where you got that from, but ever since the IBM AT, PC's have
had a hardware clock on the mainboard, independent of the OS or user
programs.
The only thing that can make those thing fail is an empty battery or
broken crystal.

The crystals that make these hardware clocks tick aren't the best in
terms of stability or accuracy of course, but with ntp for a daily
dosage of 'realtime', there's nothing wrong with the basic concept.

Er...

However, that's not the clock the operating system uses when you ask for the time: not in Linux, not in msdos. Not in a X86 type PC, regardless of the operating system.

There are two clocks on a PC. One is the CMOS clock, that runs out of battery, independent of system load, on an external chip somewhere in the mainboard (it is actually the same chip that holds the bios configuration data). However, the resolution of this clock is small, a second I think, and is slow to read. It can not be used as the system clock.

This clock is only read once, when the system boots up, in order to set up the system clock.

The system clock run originally as a timer or oscillator chip that interrupted the CPU about 19.2 times a second, and the CPU simply counted those interrupts, updating the "system clock". Today there are variations of this method, but the basis is the same.

Suse programs this clock (in the kernel) to interrupt 250 times per second. Other possible settings are 100, 300 and 1000Hz. The kernel has been known to loose clock interrupts at the fast settings, specially the 1000 Hz one if a reiserfs is also used (because it dissable interrupts in some critical sections that last too long). This is known and documented; you can find references to this problem in the ntp bugzilla.


Therefore, yes, a busy cpu can make the clock go slow. This is a fact. The kernel should compensate, though.

However, my problem is often worse when the cpu is not busy at all.


- -- Cheers,
       Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)

iD8DBQFHVzxqtTMYHG2NR9URAl5aAJ9ndfZV0YUledhTZRdGPcO3fF6OowCeMUxB
rcdvN0ZE7v/vTaIeEzl4rtM=
=0sFg
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to