LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-18-2006, 10:08 AM   #1
natasha
LQ Newbie
 
Registered: Jul 2006
Distribution: Red Hat
Posts: 12

Rep: Reputation: 0
Question How is priority inversion managed in Linux kernel?


Hello everybody,
let's consider such a situation: you have a priority 6 thread that's running, preventing a priority 3 thread from receiving CPU time; however, a priority 10 thread is waiting for some resource that the priority 3 thread has locked. Since priority 6 thread is "eating" all CPU time, priority 3 thread won't ever be allowed to release its resources, so effectively blocking priority 10 thread.
This problem is known as "priority inversion", and is solved in Windows kernel using a mechanism called "CPU starvation", not all satisfying.
How is it managed in Linux kernel?
Kisses,

Nat
 
Old 07-18-2006, 10:22 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
First off, in linux, a priority 3 thread would execute before a priority 6 thread. (Lowest number == highest priority).

But that aside, once the priority 6 thread has completed it's time slice, it is moved to the wait queue for that processor and the priority 3 thread would run, release its lock and then move to the wait queue. Now the priority 10 thread would be able to do its work.

This is all a function of the O(1) scheduler in the 2.6 kernel series.
 
Old 07-18-2006, 12:47 PM   #3
natasha
LQ Newbie
 
Registered: Jul 2006
Distribution: Red Hat
Posts: 12

Original Poster
Rep: Reputation: 0
Beg your pardon for mistake.
More infoes, even an URL?
 
Old 07-18-2006, 03:39 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
This is a pretty good article describing the behavior of the 2.6 scheduler: http://www-128.ibm.com/developerwork...y/l-scheduler/
 
  


Reply



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
how to find the priority of an inserted module in the kernel sharad Linux - Software 1 07-06-2006 06:40 AM
LXer: Rackspace launches new Linux managed-hosting service LXer Syndicated Linux News 0 02-20-2006 02:01 PM
How memory is managed in Linux? Linuxrobert Linux - General 5 11-29-2005 09:20 AM
How memory is managed in Linux? Linuxrobert Linux - Newbie 2 11-25-2005 10:13 AM
anybody using RAID1 and managed to upgrade the kernel to 2.6? kenji1903 Red Hat 2 06-20-2004 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:34 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
Open Source Consulting | Domain Registration