TITLE: Requeue PI: Making Glibc Condvars PI-Aware

AUTHOR: Darren Hart, IBM

ABSTRACT:
Glibc 2.5 and later provide some support for priority inheritance (PI), but some gaps in the pthread_cond* APIs severely cripple its utility and lead to unexpected priority inversions and unpredictable thread wake-up patterns.

By adding kernel support for proxy locking of rt-mutexes and requeueing of tasks to PI-futexes, glibc can now provide PI support across the entire spectrum of mutex and condvar APIs. This provides for more robust POSIX threading for very complex applications in which completely avoiding a priority inversion is impractical, if not impossible. Broadcast wakeups can now be more efficient, waking threads up in priority order as the contended resource becomes available.

Download paper as pdf file