Re: Nice 19 process still gets some CPU

From: Chris Friesen
Date: Mon Jun 28 2004 - 11:23:33 EST


Timothy Miller wrote:


Con Kolivas wrote:

>
> It definitely should _not_ starve. That is the unixy way of doing
> things. Everything must go forward. Around 5% cpu for nice 19 sounds
> just right. If you want scheduling only when there's spare cpu cycles
> you need a sched batch(idle) implementation.
>
>

Well, since I can't rewrite the app, I can't make it sched batch. Nice
values are an easy thing to get at for anything that's running.

Sure you can. You can set the scheduler policy on any process in the system, while its running.

int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p);

Takes about two minutes to write an equivalent to "nice" to set scheduler policies and priorities.


Chris
-
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/