[coyotos-dev] Sleep, wakeup, and persistence

Charles Landau clandau at macslab.com
Fri Sep 14 14:46:01 EDT 2007


At 2:37 PM -0400 9/14/07, Jonathan S. Shapiro wrote:
>On Fri, 2007-09-14 at 11:19 -0700, Charles Landau wrote:
>>  At 2:03 PM -0400 9/14/07, Jonathan S. Shapiro wrote:
>>  >A process wants to sleep until time X. That is easy if the system keeps
>>  >running until then, but if the system re-starts what happens?
>>  >
>>  >   1. The underlying system may not have a monotonically increasing
>>  >      clock. Many embedded systems do not.
>>
>>  You can store the time base in the checkpoint, and restore it on
>>  restart. Problem solved.
>
>That gets you a monotonically increasing clock. It does not get you an
>accurate interval, which is also required.

If you mean an accurate real-time interval, a real-time clock will 
give you that, nothing else will.

>  > 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.

Only if you expose restarts, which would be unfortunate.


More information about the coyotos-dev mailing list