Why touch the CMOS clock?

=?iso-8859-1?Q?Johan Myr=E9en?= (jem@vistacom.fi)
Mon, 6 May 1996 14:21:02 +0300 (EET DST)


I noticed the 1.3.98 patch contains the following warning:

+Also, if the kernel time is synchronized with an external source, the
+kernel will write the time back to the CMOS clock every 11 minutes. In
+the process of doing this, the kernel briefly turns off RTC periodic
+interrupts, so be aware of this if you are doing serious work. If you
+don't synchronize the kernel time with an external source (via ntp or
+whatever) then the kernel will keep its hands off the RTC, allowing you
+exclusive access to the device for your applications.

My question is: Why does the kernel have to update the RTC? It is my
understanding that the kernel only reads the RTC at boot time and does its
timekeeping using the timer interrupt. (Correct me if I'm wrong.) Why can't
the RTC be left running on its own and the RTC time be used only as an
approximation of the real time of day when the machine is power-cycled? You
can't trust the RTC anyway if the machine is down for a longer period of
time.

Johan Myreen
jem@iki.fi