RE: O(1) scheduler seems to lock up on sched_FIFO and sched_RR ta sks

From: Robert Love (rml@tech9.net)
Date: Thu Jun 19 2003 - 13:36:45 EST


On Thu, 2003-06-19 at 11:31, Perez-Gonzalez, Inaky wrote:

> I don't think is ideal either, but it is the only way I see where we
> can make sure that no user thread is going to stomp over the kernel
> toes and cause a deadlock (this is a extreme, but it can happen).

Hmm, I guess a deadlock _is_ possible but I think the issue is more of
starvation.

And we can prevent starvation just by running the kernel thread at
FIFO/99, because then it will never be starved by a higher priority
task. If the RT task being starved is also at priority 99, it will
eventually block (as in our example, on console I/O) and let the kernel
thread run. If the RT task being starved is lower priority, then there
is nothing to worry about.

I guess a real deadlock could only occur if the FIFO/99 task does not
block on the resource the kernel thread is providing but busy loops
waiting for it.

It is all a trade off, and rarely a pleasant one...

        Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:30 EST