LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 09-10-2012, 07: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, 08:38 AM   #2
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,051

Rep: Reputation: 954Reputation: 954Reputation: 954Reputation: 954Reputation: 954Reputation: 954Reputation: 954Reputation: 954
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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 03:13 AM.

Main Menu
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