Priority inheritance mutexes between normal and real-time threads?
Priority inheritance mutexes between normal and real-time threads?
- Subject: Priority inheritance mutexes between normal and real-time threads?
- From: Ross Bencina <email@hidden>
- Date: Tue, 26 Jul 2011 15:39:57 +1000
Hi everyone
I would like to know whether pthreads PTHREAD_PRIO_INHERIT mutexes
on Mac OS X can be used to avoid priority inversion between normal-band
and real-time band threads. My primary use-case is communcation between
normal-band UI threads and CoreAudio real-time band IOProcs.
The OS X Kernel Programming Guide (2006, page 73) says that pthreads APIs
only deal with priorities in the normal band. Therefore I'm unclear on
whether PTHREAD_PRIO_INHERIT mutexes can inherit priority from
THREAD_TIME_CONSTRAINT_POLICY threads.
I found a message on this list from 2003 where Jim Magee said that priority
inheritance is implemented for kernel mutexes, and that other mechanisms
were "in the very early formative stages." I'd be interested to hear where
this is up to:
http://lists.apple.com/archives/darwin-development/2003/Jan/msg00215.html
In summary, my questions are:
Does Mac OS X have a user-space mutex priority inheritance mechanism that
can be used to avoid priority inversion between normal and real-time band
threads?
Can a PTHREAD_PRIO_INHERIT mutex be reliably used for this purpose? Put
another way: Can PTHREAD_PRIO_INHERIT mutexes inherit priorities from
THREAD_TIME_CONSTRAINT_POLICY threads?
Thank you
Ross.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden