Process scheduling - how does it work.

rusty at GARNET.BERKELEY.EDU rusty at GARNET.BERKELEY.EDU
Tue Aug 15 11:38:41 AEST 1989


The renicing of long running processes is a crude hack put in by the
Berkeley people in 4bsd to attempt to improve interactive response at
the expense of cpu intensive programs which at that time on their
system probably consisted of troff jobs and such.  The algorithm in
4bsd is essentially "if the process isn't being run by root and its
niceness isn't between 0 and 4 then renice it to 4."  Therefore, you
can either renice it to some negative value (-1 for example) or 1, 2,
or 3, or have root start it.

Remember that niceness only affects things when more than 1 process is
running (R under the STAT column from the output of ps; all the others
don't count for the most part).  If only 1 process is running and it's
at nice 20 it runs at full spead (i.e., it gets 100% of the cpu).



More information about the Comp.unix.ultrix mailing list