LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices



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

Rep: Reputation: 0
mutext lock - based on thread priority?


Hi,
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, 09:38 AM   #2
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,455

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


Reply


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 02:05 AM
How can I know the priority of a kernel thread? corone Linux - General 2 10-05-2010 10:56 PM
priority for kernel thread? VGM Programming 0 04-16-2009 12:31 AM
Regarding giving the priority to a thread navderm Programming 2 12-29-2008 12:32 AM
thread priority tornatom Programming 0 08-22-2005 02:00 PM


All times are GMT -5. The time now is 08:56 PM.

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