Re: scheduler nice 19 versus 'idle' behavior / static low-priorityscheduling

From: Jan Engelhardt
Date: Fri Jan 30 2009 - 09:15:28 EST

On Friday 2009-01-30 07:48, Nathanael Hoyle wrote:
>On Fri, 2009-01-30 at 11:47 +0530, V.Radhakrishnan wrote:
>> However, the kernel also supports SCHED_FIFO and SCHED_RR which supports
>> Real Time capabilities, albeit as root.
>> [...]
>> If you wish 100% smooth display, you could make it run as SCHED_FIFO
>> which means that your foldingathome would wait quietly for the movie to
>> get completed fully. What's "wrong" with that aproach, which is
>> essentially what you want ?
>My view of what's "wrong" with that approach is that it requires root
>privileges to boost the scheduling priority of each and every process
>(although in this case, mplayer is the issue) which I want to not be
>affected by foldingathome's CPU usage.

SCHED_FIFO is dangerous - it is easy to essentially lock up your box
simply because the process in question (e.g. video decoder) just runs
forever (e.g. bug causing busyloop, and/or others do not get to run
(no other processes in the same priority class). Or they (, for
displaying your video and handling user input) run only for short
amounts of time only, giving a borked responsiveness experience to
the user.

It was about time SCHED_{BATCH,IDLE} came along ;-)

>While I happen to be root on
>this system, since it is my desktop, I would imagine there are instances
>where the root user/administrator of a system wanted to be able to run
>items which had no impact on other users, including allowing them to run
>fast and responsive applications. Aside from that, it's a PITA to start
>mplayer playing, go renice -19 it and resume watching my movie every

Even making mplayer -19 will not completely cause FAH to get zero CPU
time if the Regular Desktop Processes Everybody Needs would already
max out the CPU.

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