[coyotos-dev] Sleep for interval
Charles Landau
clandau at macslab.com
Sun Sep 30 22:51:44 EDT 2007
At 2:59 PM -0400 9/30/07, Jonathan S. Shapiro wrote:
>On Sun, 2007-09-30 at 11:34 -0700, Charles Landau wrote:
>> >Be that as it may, the issue at hand is the sleep interface. What would
>> >you propose as a better interface here?
>>
>> Easy: sleep the returnee instead of the invoker.
>> Perhaps what this means in Coyotos is "send a message to the reply
>> endpoint after the specified time".
>
>Unfortunately, this seems to require that the kernel allocate infinite
>storage.
>
>Some questions:
>
> 1. What should the kernel do if, at the time the sleep() call occurs,
> the returnee is not in the receiving state?
>
> 2. What about if the returnee exits the receiving state before the
> wakeup message arrives?
>
> 3. What about if multiple sleeps() are performed by different parties
> naming the same returnee?
I really cannot answer for Coyotos, but in CapROS these all have
straightforward answers:
1. If the returnee key is not a resume key, it is ignored.
2. If the returnee exits the receiving state, the resume key held by
the sleep object (in this case the kernel) becomes void, and no
wakeup occurs.
3. The first wakeup invokes its resume key, which voids the resume
keys held by all the other sleeps.
I should disclose that at the moment, CapROS sleep suffers from the
misfeature I'm arguing against here. I intend to fix it, and at this
point I'm not aware of any obstacles to doing so, but maybe I just
haven't thought about it enough.
More information about the coyotos-dev
mailing list