mutext lock - based on thread priority?
I have a process having more than one threads. I want to allocate a resource based on thread priority. Thread scheduling policy is SCHED_RR.
I want to ensure that mutex locking in linux is based on thread priority(one process)? Or first come first serve?
What should i do if not?
As far as I know, mutex locking is round-robin because, if it were not, high-priority threads would "starve" lower-priority ones.
If you have a "complicated" schedule contention requirement, as you may well have in a real-time application, you may need to build a more sophisticated marshaling algorithm than mutexes alone will provide.
|All times are GMT -5. The time now is 05:31 AM.|