nice(1) takes an absolute priority a

preece at ccvaxa.UUCP preece at ccvaxa.UUCP
Fri Dec 7 02:09:00 AEST 1984


>	My fix was to use nice(3c) instead of the overkill of getpriority(2).
>	Diffs follow:
-------------
Two things bother me about this statement.

Shouldn't we really be trying to avoid calls to compatibility routines?
Just because Berkeley didn't bother to remove all their own uses of them,
shouldn't we try not to introduce any more?  Well, I try, anyway.

In what sense is using getpriority "overkill"?  You must mean that using
it is more work for YOU, since it's noticeably less work for the machine.
If you use nice(3c) you add another call and then do, inside it, the
getpriority call you could have done yourself.  And whoever reads your
code has to try to remember whether that old nice call was relative or
absolute.  If you just used getpriority and setpriority it would at
least be clear exactly what you were doing.

scott preece
ihnp4!uiucdcs!ccvaxa!preece



More information about the Comp.unix.wizards mailing list