Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!rutgers!rochester!pt.cs.cmu.edu!wb1.cs.cmu.edu!avie From: avie@wb1.cs.cmu.edu (Avadis Tevanian) Newsgroups: comp.sys.next Subject: Re: nlist initialization? Message-ID: <5133@pt.cs.cmu.edu> Date: 6 Jun 89 08:12:52 GMT References: <1499@uw-entropy.ms.washington.edu> <10985@orstcs.CS.ORST.EDU> Distribution: usa Organization: NeXT, Inc. Lines: 25 In article <10985@orstcs.CS.ORST.EDU> johnsot@mist.CS.ORST.EDU (Tim G. Johnson) writes: >but when I did a lseek into /dev/kmem, I never got the load average. >If you figure actually get a valid reading, let me know. Thanks. >(BTW, try looking up _mach_factor too. I dunno what it is really, though. >/usr/ucb/w will show the mach factor with the -m flag.) > Mach doesn't use any floating point internally, so it stores the load average as a scaled integer, with a scale factor of 1000 (LSCALE in sys/kernel.h). The Mach Factor is an interesting number I made up a couple of years ago. It is intended to take into account multiprocessors, and is a measure of the expected number of processors that would be available to your application if you were to run it. For example, if there was one compute bound thread in a single cpu system, the Mach Factor would be .5 (expect 1/2 of 1 cpu). If you had 1 thread running on 2 processor system, you could expect to get 1 whole cpu, thus a Mach Factor of 1, if there were 2 threads on that same system, you could expect to get 2/3rd of a cpu (3 threads would share 2 processors if you launched a new thread), hence a Mach Factor of 0.6666. -- Avadis Tevanian, Jr. (Avie) Manager, System Software Group / Chief Operating System Scientist NeXT, Inc. avie@cs.cmu.edu or avie@NeXT.com --