auto-niceing processes?
Chuq Von Rospach
chuqui at nsc.UUCP
Wed Aug 7 02:21:11 AEST 1985
Has anyone out there done any work on setting up certain processes so that
they automatically nice themselves? I know it can be done by adding
hardcoded nice() calls to a program and recompiling, but that doesn't seem
elegant to me -- it also doesn't allow you to deal with programs you don't
have control of the source.
I've looked at it, and I see two reasonable possibilities:
o When something is put into the background, either by csh or sh, it is
given a reduced priority. They would also need to be taught to return it
to zero if it was brought back into the foreground which could get
tricky.
o Add a field to the a.out header that gives the program its nice
value, with a default of zero. When the binary is exec()ed, it's
niceness is set to whatever is in that field. A program would have
to be written to modify that field in a binary as well, but it
shouldn't be a lot of trouble (he says, blithely...)
The problem we're running into is simply large amounts of development
going on -- yesterday I found that we had 15 makes and a troff running
simultaneously, and only two of the makes were niced. Even on a 780, this
makes using emacs, vi, or even logging out relatively painful. What I want
to do is give the foreground, terminal based processes priority without
having to manually keep an eye on things...
chuq
--
:From the carousel of the autumn carnival: Chuq Von Rospach
{cbosgd,fortune,hplabs,ihnp4,seismo}!nsc!chuqui nsc!chuqui at decwrl.ARPA
Your fifteen minutes are up. Please step aside!
More information about the Comp.unix.wizards
mailing list