[comp.unix.questions] job priority

SIMSN%NUSDISCS.BITNET@cunyvm.cuny.edu (08/08/89)

 In Sys V, is there a way you can raise the job's priority after sending
 it to the background earlier on?

 Thanks.


> Sim Ser Ngarn (Jnet%"SIMSN@NUSDISCS")
> National University of Singapore
> Department of Information Systems and Computer Science

cpcahil@virtech.UUCP (Conor P. Cahill) (08/08/89)

In article <20533@adm.BRL.MIL>, SIMSN%NUSDISCS.BITNET@cunyvm.cuny.edu writes:
> 
>  In Sys V, is there a way you can raise the job's priority after sending
>  it to the background earlier on?

There is no standard system call that can be used to modify the priority, or
nice value, of an already existing process.  You can, however, using the
symbol table in /unix modify the nice value in the process structure (in /dev/kmem,
of course) for the indicated process.  Unless the permissions are really 
screwed up on your system, only the superuser will be able to do this.

This is not a thing to do lightly since a minor screw up in the location
to which you write the desired value can cause a kernel panic.  Good luck.

ag@cbmvax.UUCP (Keith Gabryelski) (08/08/89)

It is always a toss up for me to post or reply when someone sends
incorrect or misleading information to this news group.  I have
succumbed to the former.

In article <962@virtech.UUCP> cpcahil@virtech.UUCP (Conor P. Cahill) writes:
>In article <20533@adm.BRL.MIL>, SIMSN%NUSDISCS.BITNET@cunyvm.cuny.edu writes:
>>In Sys V, is there a way you can raise the job's priority after sending
>>it to the background earlier on?
>
>There is no standard system call that can be used to modify the priority, or
>nice value, of an already existing process.

Correct.

>You can, however, using the
>symbol table in /unix modify the nice value in the process structure
>(in /dev/kmem, of course) for the indicated process.  Unless the permissions
>are really screwed up on your system, only the superuser will be able to
>do this.

This is also correct, but you failed to mention /etc/renice which
exists on many System V systems (from V2.0 atleast).  It does what
the requester wanted.

There are also several public domain versions floating around.  The
one that comes to mind was posted to a source group about a year ago.
The author was Michael Ditto (ford@kenobi.UUCP).

Pax, Keith
-- 
 "It took no computation to dance to the rock 'n roll station" -- Lou Reed
ag@cbmvax.commodore.com					...!uunet!cbmvax!ag