[coyotos-dev] Sleep, wakeup, and persistence - wall clock

Valerio Bellizzomi devbox at selnet.org
Tue Sep 25 15:49:49 EDT 2007


On 25/09/2007, at 11.29, Charles Landau wrote:

>At 4:22 PM -0400 9/22/07, Jonathan S. Shapiro wrote:
>>I want to respond to one thing that Charlie wrote.
>>
>>First, let's consider the case where a system has access to a wall clock
>>[or equivalently an external time source]. Charlie has proposed that
>>such a system might want two distinct sleep interfaces:
>>
>>>  Interface 1: sleep untill a given wall clock time
>>>
>>>  Interface 2: sleep until a given wall clock time or system restart,
>>>  whichever occurs sooner
>>
>>Offhand, I don't think that this [interface 2] serves a purpose.
>
>It was someone else who suggested the need for interface 2:
>
>At 2:30 PM +0200 9/15/07, Valerio Bellizzomi wrote:
>>Yes, I agree that [cancelling sleeps on restart] 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.
>
>I don't necessarily defend that suggestion. In any case, any need for 
>interface 2 can be met by two processes, one waiting for a wall clock 
>time and one waiting for a restart.

If I don't go wrong, I think the question was later resolved as follows:

1. On restart all sleepTill() sleepers will sleep until the specified wall
time,
2. On restart all sleepFor() sleepers will be resumed.

val




More information about the coyotos-dev mailing list