Subject: Re: Clockticks lost, why ?
To: Christoph Ewering <eweri@uni-paderborn.de>
From: Erik E. Fair <fair@clock.org>
List: port-mac68k
Date: 01/24/1997 09:39:35
At 2:52 -0800 1/24/97, Christoph Ewering wrote:
>Hello guys!
>
>Could someone explain to me why it is so difficult for a Unix-system to
>hold the time.

Short answer: because the vendors don't care. They produce systems with
cheap crystal oscillators, and then (as noted) set them to lower than the
highest priority interrupt, and they write hacks to the UNIX kernel (device
drivers, other "critical" sections) which disable interrupts far too long.

The way to fix it is two fold:

1. Eliminate as much of the p =3D spl7(); /* critical code */; splx(p); out
of the kernel as possible; write device drivers to defer serious processing
until after the device interrupt is dismissed.

2. Run the Network Time Protocol (NTP) daemon on your system. This will
keep your clock in trim. It assumes a constant connection to the Internet,
alas.

	Erik