Re: Scheduler activations (IIRC) question

Ingo Oeser
2003-08-16T21:00:53Z

On Sat, Aug 16, 2003 at 08:14:36AM +0200, Mike Galbraith wrote:
> At 01:54 AM 8/16/2003 +0100, Jamie Lokier wrote:
> [...]
>
> >None of these will work well if "wakee" tasks are able to run
> >immediately after being woken, before "waker" tasks get a chance to
> >either block or put the wakees back to sleep.
> Sounds like another scheduler class (SCHED_NOPREEMPT) would be required.

Sounds more like a new futex feature: Wakeup after time expired.

It would be very easy to do, since we have a timeout handy
anyway (look at kernel/futex.c:do_futex()).

But it would require to use a kernel timer and we might add a
cancel of this wakeup returning some sane error, if the wakeup
happenend already.

Then this "blocking" could be modeled as "blocking too long",
which is how this kind of thing is handled more sanely anyway.

The only thing that is disturbing about blocking, is blocking
"too long". Blocking itself is ok, since it frees CPU time for
other processes the programmer is completely unaware of.

Regards

Ingo Oeser