Re: [RFC][PATCH] Make MAX_RT_PRIO and MAX_USER_RT_PRIO configurable

From: Ingo Molnar
Date: Thu Jul 28 2005 - 02:23:32 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> A colleague of mine, well actually the VP of my company of the time,
> Doug Locke, gave me a perfect example. If you have a program that
> runs a nuclear power plant that needs to wake up and run 4 seconds
> every 10 seconds, and on that same computer you have a program running
> a washing machine that needs to wake up every 3 seconds and run for
> one second (I'm using seconds just to make the example simple). Which
> process gets the higher priority? The answer is the washing machine.
>
> Rational: If the power plant was higher priority, the washing machine
> would fail almost every time, since the power plant program would run
> for 4 seconds, and since the cycle of the washing machine is 3
> seconds, it would fail everytime the nuclear power plant program ran.
> Now if you have the washing machine run in it's cycle, the nuclear
> power plant can easily make the 4 seconds ever 10 seconds, even when
> it is interrupted by the washing machine.

nitpicking: i guess the answer also depends on what the precise
requirement is. If the requirement is 'run for 4 seconds every 10
seconds, uninterrupted, else the power plant melts down', i'd sure not
make the washing machine process the higher priority one ;-)

(also, i'd give the power plant process higher priority even if the
requirement is not as strict, just from a risk POV: what if the washing
machine control program is buggy and got into an infinite loop
somewhere.)

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