Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Priority inheritance

Reply
Thread Tools

Priority inheritance

 
 
Daniel Cunha
Guest
Posts: n/a
 
      11-13-2008
Hi,


I would like to now if there is a library that implements priority
inheritance in Ruby.

I now that some people thing that you are already in trouble if you need
to use this approach. But I really need to.

A little about priority inheritance:

"Imagine a system with two processes running, one at high priority and
the other at a much lower priority. These processes share resources
which are protected by locks. At some point, the low-priority process
manages to run and obtains a lock for one of those resources. If the
high-priority process then attempts to obtain the same lock, it will
have to wait. Essentially, the low-priority process has trumped the
high-priority process, at least for as long as it holds the contended
lock.

Now imagine a third process, one which uses a lot of processor time, and
which has a priority between the other two. If that process starts to
crank, it will push the low-priority process out of the CPU
indefinitely. As a result, the third process can keep the
highest-priority process out of the CPU indefinitely.

This situation, called "priority inversion," tends to be followed by
system failure, upset users, and unemployed engineers. There are a
number of approaches to avoiding priority inversion, including lockless
designs, carefully thought-out locking scenarios, and a technique known
as priority inheritance. The priority inheritance method is simple in
concept: when a process holds a lock, it should run at (at least) the
priority of the highest-priority process waiting for the lock. When a
lock is taken by a low-priority process, the priority of that process
might need to be boosted until the lock is released." [1]

More references about PI:

[1] http://lwn.net/Articles/178253/

http://kernelnewbies.org/Linux_2_6_18
http://www.linuxdevices.com/articles/AT7168794919.html
http://www.xenomai.org/documentation...up__synch.html


Thanks in advance,

Daniel Cunha


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
efficient priority queue for a few descrete priority levels Marcel Müller C++ 3 04-27-2009 03:22 PM
D300 BUG in Aperture Priority & Shutter Priority Mode Chico Digital Photography 21 06-23-2008 01:55 PM
Shutter Priority Vs. Aperture Priority Question mutefan@yahoo.com Digital Photography 13 09-14-2006 03:51 PM
Should I use shutter-priority or appurature-priority? ½ Confused Digital Photography 4 02-22-2006 09:48 AM
Question about Aperture priority and Shutter Priority John Edwards Digital Photography 8 01-05-2005 04:58 PM



Advertisments