Priority inheritance

Discussion in 'Ruby' started by Daniel Cunha, Nov 13, 2008.

  1. Daniel Cunha

    Daniel Cunha Guest

    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/trunk/html/api/group__synch.html


    Thanks in advance,

    Daniel Cunha
     
    Daniel Cunha, Nov 13, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mosow

    aspnet_wp.exe priority

    mosow, Apr 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    380
    mosow
    Apr 16, 2004
  2. Replies:
    1
    Views:
    507
    Bruce Barker
    Nov 10, 2005
  3. Amil
    Replies:
    2
    Views:
    1,341
  4. Alistair Atkinson

    Setting the priority a WebStart app

    Alistair Atkinson, Sep 20, 2003, in forum: Java
    Replies:
    5
    Views:
    388
    Alistair Atkinson
    Sep 24, 2003
  5. Marcel Müller
    Replies:
    3
    Views:
    565
    Marcel Müller
    Apr 27, 2009
Loading...

Share This Page