Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!olivea!orc!inews!cmdnfs!bhoughto From: bhoughto@cmdnfs.intel.com (Blair P. Houghton) Newsgroups: comp.sys.apollo Subject: Re: Process Priorities Message-ID: <545@inews.intel.com> Date: 22 Oct 90 15:41:28 GMT References: <9010220501.AA09206@pan.ssec.honeywell.com> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 43 In article <9010220501.AA09206@pan.ssec.honeywell.com> thompson@PAN.SSEC.HONEYWELL.COM (John Thompson) writes: >What we would like is a mechanism that gives out cpu time to all intensive >jobs, not just the high-priority ones. If process priorities aged while >they were INVOLUNTARILY swapped out, we could probably find a set of >priorities that gave the approximate percentages. > >Am I mistaken, or do _real_ unix priorities age the way I want DomainOS >priorites to? Well, semantically, there is no _real_ unix, only various flavors of frozen-yogurt unix... BSD4.3, according to "The Design and Implementation of the 4.3BSD UNIX(R) Operating System" by S. J. Leffler, et al, computes process priority thusly: p_usrpri = PUSER + p_cpu/4 + 2*p_nice where PUSER is the offset between system and user priority as compiled into the kernel p_cpu is the CPU utilization: the time, in clock-ticks (1 per millisecond, usually), that the process has been in the RUN state p_nice is the nice value as assigned (in your case, either 0 or -5) p_cpu does "age"; it decays according to the following formula which is computed once per second for each process in the queues: p_cpu = p+nice + p_cpu * (2*load)/(1 + 2*load) where load is an average of the run-queue length over the past minute That's what "real" unix does. I don't even know enough about my Apollos yet to find the priority, so I can't compare the computations, myself... --Blair "All's I need's a good binary editor and a brand new copy of cc..."