[coyotos-dev] Sleep, wakeup, and persistence
David Hopwood
david.hopwood at industrial-designers.co.uk
Fri Sep 14 22:40:38 EDT 2007
Jonathan S. Shapiro wrote:
> On Fri, 2007-09-14 at 11:19 -0700, Charles Landau wrote:
>
>> Perhaps it makes more sense to support different types of sleep:
>> sleep until a given real time (and time zone)
>> sleep for x seconds from now
>> sleep for a given amount of system-up time
>
> All of these can be expressed at user level. Inside the kernel, the
> primitive is "sleep until absolute time X has arrived".
No. It is not possible to express a relative wait in terms of an
absolute wait, since the time and the time zone may change part-way
through. Please do not make this mistake; it is critical to many
real-time (soft or hard) applications to have support for relative
timekeeping that is independent of changes to the system clock.
If the system is shut down, then ideally applications should have
a minimum time before the shutdown to make preparations for it. If
the system crashes unexpectedly, then when it restarts, each
process that has registered to be informed of crashes should
be interrupted, before resuming the code that it was running.
--
David Hopwood <david.hopwood at industrial-designers.co.uk>
More information about the coyotos-dev
mailing list