Rules and priorities for background processes



Last revision August 9, 2004

Table of Contents:

  1. Shell interpretation
  2. Editing command lines
  3. Stuck in a Unix login session?
  4. Program execution
  5. Simple commands
  6. Unix command syntax
  7. Controlling processes
  8. Your login environment

Background processes on Unix resemble batch jobs on other systems, with the important exception that there is no master batch scheduler to control how many jobs can run in the background at once. The users must therefore take care to limit background use to avoid overtaxing the system.

Do not run more than one large program in the background at a time. Several small programs in the background at once are okay. For pangea, a specific set of rules apply to big jobs.

Don't run something in the background when you are planning to just wait for it to finish anyway before doing anything else. Save the background for cases where you need to do some other commands while the background job is running.

Use the nice command to give your big background jobs a lower execution priority, particularly in the daytime, so they do not interfere with interactive response. nice is a prefix command that signals the login shell to start another program with a lower priority. For example, the Fortran program bigjob could be started in the background with a lower priority with:

nice bigjob

Priority levels range from 0 (the highest) to 20 (the lowest). The default priority for nice in the C-shell is 4. An option to nice allows you to select a different priority level. On pangea, you should start big background jobs with priority 10, using this syntax from the C-shell command line:

nice +10 bigjob

Substitute your actual command line for bigjob.

Note that the syntax shown above for the nice command applies to the version built-in to the C-shell, and is documented deep within the on-line manual page csh(1). If you try to look up documentation for the nice command directly, that is, using the command

man nice

you will be shown the syntax for the separate nice program that is used by the Bourne and Korn shells. Don't get the two versions of nice confused.

<--Previous Overview Next-->

Comments or Questions?