LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2005, 04:59 PM   #1
lordofring
Member
 
Registered: Feb 2005
Posts: 91

Rep: Reputation: 15
linux scheduling problem


Hello,

In my application, there are several threads sharing one bus. I used a mutex to protect the bus. One of the thread is control thread which has the highest priority. I know that the lower priority thread which locked the mutex will block the higher priority thread. This delay is acceptable for me. My question is: after the lower thread unlock the mutex, will the higher priority thread guarantee to get the mutex among other waiting thread? I suppose the unlock will move all waiting threads to the running queue, then they're scheduled based on the priority. If I understand correctly, my higher priority thread will be the first one to get the mutex after it's unlocked, even there are lower priority threads starting to wait for the mutex earlier than it.

Thanks

lordofring
 
Old 08-29-2005, 05:10 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,650
Blog Entries: 4

Rep: Reputation: 3936Reputation: 3936Reputation: 3936Reputation: 3936Reputation: 3936Reputation: 3936Reputation: 3936Reputation: 3936Reputation: 3936Reputation: 3936Reputation: 3936
My understanding is that the LinuxThreads behavior is to release all of the waiting processes at once, while NPTL implements a queue. But don't queue-ote me on that...
 
Old 08-30-2005, 09:08 AM   #3
lordofring
Member
 
Registered: Feb 2005
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks anyway.
 
  


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
scheduling problem using 'at' medmedia Linux - Software 7 12-05-2005 04:10 AM
editing the linux cpu scheduling algo cathiejcm Linux - Software 1 11-11-2005 07:25 AM
Scheduling in Linux asurya Linux - General 5 08-31-2005 08:34 AM
Process Scheduling in Linux Newbiegal Programming 6 10-04-2004 12:08 PM
Linux Scheduling Kumar Programming 3 06-14-2004 04:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:25 AM.

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
Open Source Consulting | Domain Registration