Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/17/84 chuqui version 1.7 9/23/84; site nsc.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!nsc!chuqui
From: chuqui@nsc.UUCP (Chuq Von Rospach)
Newsgroups: net.unix-wizards
Subject: auto-niceing processes?
Message-ID: <3086@nsc.UUCP>
Date: Tue, 6-Aug-85 12:21:11 EDT
Article-I.D.: nsc.3086
Posted: Tue Aug  6 12:21:11 1985
Date-Received: Sat, 10-Aug-85 04:36:42 EDT
Distribution: net
Organization: The Dreamer Fithp
Lines: 32

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@decwrl.ARPA

Your fifteen minutes are up. Please step aside!