Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 May 1997 08:20:06 +0200
From:      j@uriah.heep.sax.de (J Wunsch)
To:        freebsd-hackers@freefall.FreeBSD.org
Subject:   Re: top / nice level problem
Message-ID:  <19970516082006.WG61089@uriah.heep.sax.de>
In-Reply-To: <199705130810.KAA03359@gil.physik.rwth-aachen.de>; from Christoph Kukulies on May 13, 1997 10:10:53 %2B0200
References:  <199705130810.KAA03359@gil.physik.rwth-aachen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
As Christoph Kukulies wrote:

> I'm running the bovrc client (http://vex.net/rsa) at nice level 20
> and a colleague is running another job at nice level 5.
> 
> Now he asks me: why does my job only get 50% of CPU while yours (at nice
> level 20 also gets 50%)?

Because we are unix.  If we were RSX-11 (or probably VMS, but i don't
know that), his job would get all the CPU whenever it's runnable, and
your bovrc would only get CPU slices as they are left.  Unix doesn't
use fixed priorities, but dynamically reprioritizes the jobs according
to their recent CPU usage.  If your bovrc occasionally waits for disk
IO and doesn't request the CPU all day, it will be higher prioritized
in the end whenever it needs the CPU.

I recently held a training course for Unix newbies, and made the
experiment to start this job twice in the background:

	while true; : ; done

One of them was reniced then, and the result was that the reniced job
still got 33 % of the CPU.  With a realtime operating system, it
wouldn't have got any CPU at all, since the other job was always
runnable.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970516082006.WG61089>