[lkml]   [2001]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Scheduling of low-priority background processes
On Mon, 5 Nov 2001, Thomas Koeller wrote:

> On those systems, you could assign a scheduling priority lower than
> the one nomally used by interactive processes to CPU-hogging,
> numbercrunching tasks. These tasks would then use up any CPU time left
> over by interactive processes without otherwise interfering with them.
> I always found this feature very useful (think of SETI@home!).

> But that idea is so obvious, and since nobody did it so far, I am
> probably missing something. What is it?

Priority inversion. I did a patch which does exactly
what you describe, around the 2.1 timeframe. It worked
fine most of the time, but occasionally the following

1) a SCHED_IDLE process got hold of some kernel lock
2) a normal, low-priority process started eating CPU
for a number of seconds
3) a high-priority normal process wanted the lock the
SCHED_IDLE task had, but had to wait several seconds,
at times up to a minute, before the SCHED_IDLE task
got a chance to run and release the lock

This wasn't too much of a problem on my own system, but
of course this is an easily exploitable vulnerability for

For me, this just means we should improve the scheduler so
nice levels are stronger ... say that a nice +20 process
only gets 1% of the CPU of a normal priority process ;)


DMCA, SSSCA, W3C? Who cares?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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