[coyotos-dev] coyotos.sleep, sleepTill, the epoch
Jonathan S. Shapiro
shap at eros-os.com
Mon Feb 12 08:48:05 CST 2007
On Mon, 2007-02-12 at 02:54 +0100, Valerio Bellizzomi wrote:
> >I think because you need to know the time surprisingly regularly, also
> >as far as I can tell it will only give you the time to the nearest
> >second anyway. This is reasonable, but doesn't help the scheduler much.
> The tick counter is also surprisingly prone to variations, this doesn't
> help too.
I not observed significant problems of this sort. The problem with the
PC ToD clock is that it's frequency is (a) slow, and (b) does not
naturally divide any useful unit of time. Simply reprogramming that
timer helps quite a lot (which we did in EROS), but it really isn't good
The APIC implements a regular counter that is *supposed* to move at a
known rate independent of the CPU clock. On most chips this works fine,
but on a few it is broken. This is extremely irritating. It means that
you need to know when the CPU clock speed changes and react *very*
quickly to preserve accurate time. What a mess.
Jonathan S. Shapiro, Ph.D.
The EROS Group, LLC
+1 443 927 1719 x5100
More information about the coyotos-dev