From owner-freebsd-hackers Thu May 15 23:23:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA11208 for hackers-outgoing; Thu, 15 May 1997 23:23:27 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id XAA11199 for ; Thu, 15 May 1997 23:23:23 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id IAA27950 for freebsd-hackers@freefall.FreeBSD.org; Fri, 16 May 1997 08:23:18 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id IAA03641; Fri, 16 May 1997 08:20:07 +0200 (MET DST) Message-ID: <19970516082006.WG61089@uriah.heep.sax.de> 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 References: <199705130810.KAA03359@gil.physik.rwth-aachen.de> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199705130810.KAA03359@gil.physik.rwth-aachen.de>; from Christoph Kukulies on May 13, 1997 10:10:53 +0200 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. ;-)