From: utzoo!decvax!harpo!ihnp4!ixn5c!inuxc!pur-ee!CSvax:Pucc-H:Physics:crl Newsgroups: net.unix-wizar Title: Re: automatic niceing by kernel - (nf) Article-I.D.: pur-phy.585 Posted: Mon Nov 22 10:27:06 1982 Received: Tue Nov 23 01:48:24 1982 #R:micomvax:-10400:pur-phy:12700007:000:1201 pur-phy!crl Nov 22 10:22:00 1982 We run Berkeley's 2.8bsd and some of the first things we did were: 1) to add a renice system call (so we didn't have to write over /dev/kmem) and 2) to add an autonicing feature. The way it was implemented here was to nice +5 all background jobs when a user logged himself out. Since all we have is a PDP-11/44, we decided that we must give priority to interactive processes, and the best way to do this was to renice background jobs. We looked at basing the renice on CPU time used, length of run, etc., but couldn't think of a very good way to implement this, since all that information is in the user structure which is only available when a process is actually running. Thus, to make the time checks, we'd have to put the code in clock.c at every clock tick. Therefore, we opted to do the background renicing only. It is probably the best thing we ever did. Even though our load occasionally rises to over 5 due to 3 or more background jobs, interactive users rarely get very impacted, which is our desire. Furthermore, the background jobs usually manage to get a fair share or runtime anyways, since those interactive jobs rarely run continuously. Charles LaBrec ... pur-ee!physics:crl