Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


Search this Thread
Old 09-10-2012, 07:28 AM   #1
LQ Newbie
Registered: Jan 2010
Posts: 5

Rep: Reputation: 0
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?

Thank you
Old 09-10-2012, 08:38 AM   #2
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,652

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way that application thread can boost priority of Kernel thread in Linux Chetansingh Parihar Linux - Kernel 4 07-25-2012 01:05 AM
How can I know the priority of a kernel thread? corone Linux - General 2 10-05-2010 09:56 PM
priority for kernel thread? VGM Programming 0 04-15-2009 11:31 PM
Regarding giving the priority to a thread navderm Programming 2 12-28-2008 11:32 PM
thread priority tornatom Programming 0 08-22-2005 01:00 PM

All times are GMT -5. The time now is 02:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration