futex.2: Add overview of priority inheritance

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-01-16 21:25:04 +01:00
parent b565548bfa
commit 7d20efd7b0
1 changed files with 16 additions and 0 deletions

View File

@ -638,6 +638,22 @@ the low-priority process from the CPU.
Consequently, the low-priority process makes no progress toward
releasing the lock, and the high-priority process remains blocked.
Priority inheritance is a mechanism for dealing with
the priority-inversion problem.
With this mechanism, when a high-priority process becomes blocked
by a lock held by a low-priority process,
the latter's priority is temporarily raised to that of the former,
so that it is not preempted by any intermediate level processes,
and can thus make progress toward releasing the lock.
To be effective, priority inheritance must be transitive,
meaning that if a high-priority process blocks on a lock
held by a lower-priority process that is itself blocked by lock
held by another intermediate-priority process
(and so on, for chains of arbitrary length),
then both of those process
(or more generally, all of the processes in a lock chain)
have their priorities raised to be the same as the high-priority process.
.\" FIXME ===== Start of adapted Hart/Guniguntala text =====
.\" The following text is drawn from the Hart/Guniguntala paper,
.\" but I have reworded some pieces significantly. Please check it.