whats going on with the scheduler?

Doug White dwhite at gumbysoft.com
Tue Jul 8 11:41:47 PDT 2003


On Tue, 8 Jul 2003, Andy Farkas wrote:

> Any other ideas? Why would 3 (niced) cpu intensive processes suddenly get
> reduced cpu time (on a 4 cpu system) when a 4th non-resource intensive
> process gets started?

Hm.. guess its time to explain how nice works again.

Nice is a relative value.  If you have 2 processes in a system, one with a
lower nice value (== higher "priority") than the other, the lower-niced
process will be scheduled in deference to the higher-niced process.  The
scheduler attempts to ensure that niced processes are not starved.  (In
practice, nice level 20 gets some special treatment.)

If you don't want higher-niced processes to get their cpu time reduced
when a lower-niced process starts doing work, then don't nice them.

I'm sure Terry will pick this to death, buut you get the idea.  I think
the daemon book explains this better than I could (and with infinitely
more detail).

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite at gumbysoft.com          |  www.FreeBSD.org


More information about the freebsd-current mailing list