nice

utzoo!decvax!ucbvax!hpvax!sri-unix!mike at BRL utzoo!decvax!ucbvax!hpvax!sri-unix!mike at BRL
Mon Jan 18 21:06:35 AEST 1982


There are few UNIX sites that DON'T want to give better
service to "interactive" style programs.  Our UNIX system
accomplishes this quite well, without the need for tomfoolery
on the part of the users.  We did it with a variety of modifications
to the operating system, which I am quite willing to share with
the world.  The most useful parts of these include:

	setpri/slp.c - the p_pri value depends on a number of things now,
		such as cpu usage history (decay curve weighted memory),
		block i/o system usage history (""), core requirements
		(NOT Kilo-core-ticks), and "NICE" value.

	clock/clock.c - the cpu usage history value, and the memory functions
		are implemented here.  There are three values (INRAT:  in
		core and selected this second, NSELRAT: in core but not
		selected at all this second, and OUTRAT: swapped out).
		These control the decay of the memory function.
		Also, for each MINUTE of cumulative CPU time a process uses,
		their "NICE" value is made worse by 1 point (p_nice++).

There are a lot of other things we have done, but just the changes mentioned
above make a BIG difference in performance.  The nicest part is that everything
is automatic.

For those of you who like to diddle priorities, I can supply you with a
program we wrote called NICER, which allows Superusers and systems people
the ability to change the NICE value of any running process.  We implemented
a change to the swtch/slp.c routine so that a p_nice value prevents
the process from getting ANY more cpu time.  A value of 127 can only be
achieved by NICER, so this is a good way for the administrator to
"set aside" a cruncher for a bit.

Are people interested in hearing all the gory details of these changes?
I will mail source (or tapes) to any who provide me with their
license info...
					-Mike



More information about the Comp.unix.wizards mailing list