4.3.5.1. Priority
The priority or importance of a job is defined by it's
nice number. A program with a high nice number is friendly
to other programs, other users and the system; it is not an
important job. The lower the nice number, the more important a job
is and the more resources it will take without sharing them.
Making a job nicer by increasing its nice number is only useful
for processes that use a lot of CPU time (compilers, math
applications and such). Processes that always use a lot of I/O time
are automatically rewarded by the system and given a higher
priority (a lower nice number), for example keyboard input always
gets highest priority on a system.
Defining the priority of a program is done with the nice command.
Most systems also provide the BSD renice
command, which allows you to change the niceness of a
running command. Again, read the man page for your system-specific
information.
|
Interactive programs |
|
It is NOT a good idea to nice or
renice an interactive program or a job
running in the foreground.
|
Use of these commands is usually a task for the system
administrator. Read the man page for more info on extra
functionality available to the system administrator.