Re: [2.4.17/18pre] VM and swap - it's really unusable

Oliver Neukum
2002-01-14T22:48:06Z

> Well, semaphores block. And we have these races right now with
> SCHED_FIFO tasks. I still contend preempt does not change the nature of
> the problem and it certainly doesn't introduce a new one.

But it does:

down(&sem);
do_something_that_cannot_block();
up(&sem);

Will stop a SCHED_FIFO task for a definite amount of time. Only
until it returns from the kernel to user space at worst.

If do_something_that_cannot_block() can be preempted, a SCHED_FIFO
task can block indefinitely long on the semaphore, because you have
no guarantee that the scheduler will ever again select the the preempted task.
In fact it must never again select the preempted task as long as there's
another runnable SCHED_FIFO task.

Regards
Oliver