lkml.org 
[lkml]   [1999]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: priority inversion
On Fri, 30 Jul 1999 yodaiken@chelm.cs.nmt.edu wrote:
> We haven't yet touched on the topic of releases. Instead of clear_bit, we now
> need to figure out whether we were promoted while holding the lock, and what our new
> priority should be.
>
> I can't figure out how to do all that in 5 instructions.

I can't figure out how to do a schedule() in 5 instructions (that's what's
needed when process X can't get resource Y). The common case is when you
can get your lock in the first step, and that's 5 instructions. If
something goes wrong, your last instruction is a taken branch, and it can
either take you back to try again (spin lock), or take you somewhere else
(traditional lock, with falling asleep).

Because of the design of spin-locks (locking should always only take a
short time, because others actively poll to get that lock), preempting a
process while it has a lock is just not an option. It hurts, then don't do
it.

But since the Linux kernel still has normal locks, we either go to
eliminate those altogether, or think about priority inheritence for them.

> If you can't read postscript, I can send you PDF.

Have you really read the paper (I think you have written it)? The author
proposes several lock-free strategies to overcome the problem. Actually,
Linux doesn't use these lock-free strategies (at least not all over the
place, there are still locks), although it would be really nice if it
does.

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


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

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.074 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site