Re: priority inversion

Bernd Paysan (bernd.paysan@gmx.de)
Fri, 30 Jul 1999 16:14:21 +0200 (MEST)


> In the common case, Linux processes acquire kernel locks in 4 or 5
> instructions, not O(1). What is the overriding benefit we obtain by
> replacing that with such a mess?

The common case (lock is free and can be obtained quickly) is not even in
discussion here. It's the case that the lock is already obtained by another,
lower priority process that isn't scheduled again (to release the lock)
because of another higher priority process that is runnable. This is the
"priority inversion" we are talking about.

Just looking on the common place will give you a formula one car, even
when you have to go off-road once in a while. The fun here is that the common
case is not affected at all. It's the case where schedule() is to be called
that is affected, and actually, an O(1) scheduler improves that one, too.

Priority inversion only gets messy when you use the current scheduler
approach (compute goodness of all runnable processes, and select best).

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/

Sent through Global Message Exchange - http://www.gmx.net

- 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/