[net.unix] Priority shells, do they work?

hubert@entropy.UUCP (Steve Hubert) (02/11/85)

We are thinking about implementing nice priorities at login.
In other words, every user would have a base nice value assigned
to the login shell and its children.  We are running 4.2BSD and
virtually everyone uses csh as their login shell.  Has anyone tried
this and does it work?  I'm hoping that it would allow high priority
users to use the machine whenever they want, lower priority users
could use it only if there weren't a lot of high priority users (or 
could use it in slow mode with the high priority users) and so on.

I don't know enough about the scheduling, paging, and swapping
algorithms to know what the effect will be.  Will it accomplish
what I want without a lot of overhead or will it cause the system
to thrash with lots of paging and swapping.

We have a vax 750 with 2 RA81's on a single UDA50.  33MB of paging
space on each disk.  3MB of memory, soon to be increased.  The mix
of jobs on the system is a lot of troff and TeX jobs, a lot of
long running number crunchers, plus the usual edit jobs to go with
them.  

Steve Hubert
 Dept. of Stat., U. of Wash, Seattle
 {allegra,decvax,ihnp4,ucbvax!lbl-csam}!uw-beaver!entropy!hubert
 hubert%entropy@uw-beaver

guy@rlgvax.UUCP (Guy Harris) (02/16/85)

> Yes you can setup login to give a set of priorities to users.

In fact, the System V Release 2.0 "login" supports his (undocumented, of
course - this *is*, after all, UNIX, home of the useful but undocumented
feature).  Begin the "gecos" field with "pri=<number>" (number may be
positive or negative) and it'll do a "nice(number)" before it asks for
the user's password.  (On a heavily-loaded system you might, admittedly,
be able to use this trick to figure out which accounts exist.)

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy

dlm@cuuxb.UUCP (Dennis L. Mumaugh) (02/20/85)

Yes you can setup login to give a set of priorities to users.  On a system
many years ago we had the default nice as 2 set in the code of login just
before we ran the user's shell.  Then we set some programs such as cc and n/troff
to a nice of 3 and the editors [RAND and VI] to a nice of 1.  You
can do some sort of variation on that.  If you assign a different
nice to a given user, then the changes to n/troff, cc and the editors need
to calculate a "relative" change to the current nice.

Warning: small changes to nice can have powerful effect.  We niced a program
at 5 once and it took 6 hours to run.


Dennis Mumaugh
Computer Systems Center
Lisle, Illinois