[coyotos-dev] Sleep, wakeup, and persistence

Valerio Bellizzomi devbox at selnet.org
Sat Sep 15 18:46:23 EDT 2007


On 15/09/2007, at 14.48, Charles Landau wrote:

>>On 15/09/2007, at 10.14, Charles Landau wrote:
>>
>>>At 2:30 PM +0200 9/15/07, Valerio Bellizzomi wrote:
>>>>On 15/09/2007, at 11.34, Sam Mason wrote:
>>>>   >It seems to me that the only sensible thing the kernel can do is
the
>>>>>first option, that of cancelling all sleeps upon restart.  If there's
>>>>>a chance that the kernel isn't going to know the time when it
restarts
>>>>>then it can't do anything else.
>>>>
>>>>Yes, I agree that (1) seems to be the only sensible thing to do. If
the
>>>>system had a power loss, probably there is some alarm to service ASAP
on
>>>>restart, and you don't want you application to be sleeping at that
time.
>>>
>>>It does not follow that *all* sleeps should be cancelled. The program
>>>that needs to service the alarm needs to be woken up, but some other
>>>applications can continue to sleep blissfully. They need different
>>>interfaces.
>>
>>Can you expand on that?
>>How the interfaces whould differ ?
>
>For example:
>
>Interface 1: sleep untill a given wall clock time
>
>Interface 2: sleep until a given wall clock time or system restart, 
>whichever occurs sooner

The current sleep interface could have an additional parameter: Enable
wakeup on system restart,
Or, if semantically you prefer: Disable wakeup on system restart.

val




More information about the coyotos-dev mailing list