Re: Real Time scheduler?

Victor Yodaiken (yodaiken@ladron.cs.nmt.edu)
Wed, 10 Feb 1999 05:39:43 -0700 (MST)


> The solution is PRIORITY INVERSION: If a high prio process is waiting for
> something a low prio porcess provides, the low prio process should
> temporarily get the high prio.

You mean "PRIORITY INHERITANCE" and this breaks the system in many many ways.
First question is what "temporarily" means and there are several different
answers, each is wrong in its own way.

> If the processes are passing data through the kernel or using kernel's
> resources, it should be detected by the kernel. If data is passed in memory
> (shared mem, e.g.), it's up to the userspace implementation to take care.

Consider Process 0 ... 255 share a 1000 file descriptors in some
Lowest priority process P0 does a select on FD {0}
and is preempted by P1 which does a select on FD {0,1} blocking and passing
priority to P0, which is then prempted by P2 which selects {2,3} etc.
Good thing the kernel has nothing else to do but assist in computing this
rolling deadlock. And then suppose that P0 has "alarm" set for 2 minutes
and aborts its select halfway into this process. Time for the kernel to
get really busy! We won't have to be jealous of the performance offered
by NT anymore.

And then consider how a kernel that depends on the operation of many daemon
processes will continue to operate when users can introduce arbitrarily many
"RT" processes that can block daemons indefinitely.

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