Re: wait for process terminate
From: Martin Harvey (Demon account) (martin_at_nospam_pergolesi.demon.co.uk)
Date: 10/12/04
- Next message: Martin Harvey (Demon account): "Re: wait for process terminate"
- Previous message: Martin Harvey (Demon account): "Re: wait for process terminate"
- In reply to: Rob Kennedy: "Re: wait for process terminate"
- Next in thread: Martin Harvey (Demon account): "Re: wait for process terminate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 12 Oct 2004 21:03:07 GMT
On Mon, 11 Oct 2004 18:09:17 -0500, Rob Kennedy <me3@privacy.net>
wrote:
>Sleep returns to find that the thread has a brand-new timeslice rather
>than the partial one from before. Is there a way we could test this?
It won't quite work like this - sleep will return to give it the
remainer of it's "timeslice", and the scheduler will be reinvoked at
the appropriate time.
The reason it is very likely to be this way is that the scheduler will
be invoked on a timer interrupt. Giving a thread a "brand new"
timeslice after the use of sleep would require sceduling all further
"timeslices" some fraction of the timer period down.
Not only that, it's probably not a good idea to allow that sort of
behaviour, because an application could concievably steal timeslices
off another if it knew this was the case.... although it would have to
know (or take an educated guess) at the scheduling activity of the
other.
MH.
- Next message: Martin Harvey (Demon account): "Re: wait for process terminate"
- Previous message: Martin Harvey (Demon account): "Re: wait for process terminate"
- In reply to: Rob Kennedy: "Re: wait for process terminate"
- Next in thread: Martin Harvey (Demon account): "Re: wait for process terminate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|