Processes

A program or command that is actually running on the computer is referred to as a process.

Processes exist in parent-child hierarchies. A process started by a program or command is a parent process; a child process is the product of the parent process. A parent process can have several child processes, but a child process can have only one parent.

The system assigns a process identification number (PID number) to each process when it starts. If you start the same program several times, it will have a different PID number each time.

When a process is started on a system, the process uses a part of the available system resources. When more than one process is running, a scheduler that is built into the operating system gives each process a share of the computer's time, based on established priorities. These priorities can be changed by using the nice or renice commands.

Note: To change a process priority to a higher one, you must have root user authority. All users can lower priorities on a process they start by using the nice command or on a process they have already started, by using the renice command.

The following list describes the types of processes:

Foreground and background processes

Processes that require a user to start them or to interact with them are called foreground processes. Processes that are run independently of a user are referred to as background processes. Programs and commands run as foreground processes by default. To run a process in the background, place an ampersand (&) at the end of the command name that you use to start the process.

Daemon processes

Daemons are processes that run unattended. They are constantly in the background and are available at all times. Daemons are usually started when the system starts, and they run until the system stops. A daemon process typically performs system services and is available at all times to more than one task or user. Daemon processes are started by the root user or root shell and can be stopped only by the root user. For example, the qdaemon process provides access to system resources such as printers. Another common daemon is the sendmail daemon.

Zombie processes

A zombie process is a dead process that is no longer executing but is still recognized in the process table (in other words, it has a PID number). It has no other system space allocated to it. Zombie processes have been killed or have exited and continue to exist in the process table until the parent process dies or the system is shut down and restarted. Zombie processes display as <defunct> when listed by the ps command.