lkml.org 
[lkml]   [2000]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Weightless process class
On Wed, 4 Oct 2000, Rik van Riel wrote:
> On Wed, 4 Oct 2000, LA Walsh wrote:
>
> > I had another thought regarding resource scheduling -- has the
> > idea of a "weightless" process been brought up?
>
> Yes, look for "idle priority", etc..
> It also turned out to have some problems ...
>
> > Weightless means it doesn't count toward 'load' and the class
> > strictly has lowest priority in the system and gets *no* CPU
> > unless there are "idle" cycles. So even a process niced to -19
> > could CPU starve a weightless process.
>
> One problem here is that you might end up with a weightless
> process having grabbed a superblock lock, after which a
> normal priority CPU hog kicks in and starves the weightless
> process.
>
> The result is that that superblock lock never gets released,
> and everybody needing to grab that lock blocks forever, even
> if they have a higher priority than the CPU hog that's starving
> our idle process...
>
> The solution to this would be only starve these processes
> when they are in user space and can no longer be holding
> any kernel locks.

The general solution, which SGI implements in IRIX, is to implement
priority inheritance for blocking locks. So the weightless process
gets the priority of the blocked process until it releases the lock.
IRIX multi-reader semaphores initially did not implement priority
inheritance, until this type of starvation scenario occured!

I'm working on making the linux kernel fully preemptible (as I
did for IRIX when I used to work at SGI), and will need
priority inheritance mutexes to enable real-time behavior for
SCHED_FIFO and SCHED_RR tasks. So someone at MontaVista will
be looking at this in the 2.5 timeframe.

Nigel Gamble
nigel@mvista.com
www.mvista.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.074 / U:7.872 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site