process table

process table

(operating system, process)A table containing all of theinformation that must be saved when the CPU switches fromrunning one process to another in a multitasking system.

The information in the process table allows the suspendedprocess to be restarted at a later time as if it had neverbeen stopped. Every process has an entry in the table. Theseentries are known as process control blocks and contain thefollowing information:

process state - information needed so that the process can beloaded into memory and run, such as the program counter, thestack pointer, and the values of registers.

memory state - details of the memory allocation such aspointers to the various memory areas used by the program

resource state - information regarding the status of filesbeing used by the process such as user ID.

Accounting and scheduling information.

An example of a UNIX process table is shown below.

SLOT ST PID PGRP UID PRI CPU EVENT NAME FLAGS0 s 0 0 0 95 0 runout sched load sys1 s 1 0 0 66 1 u init load2 s 2 0 0 95 0 10bbdc vhand load sys

SLOT is the entry number of the process.

ST shows whether the process is paused or sleeping (s), readyto run (r), or running on a CPU (o).

PID is the process ID.

PGRP is the process Group.

UID is the user ID.

PRI is the priority of the process from 127 (highest) to 0(lowest).

EVENT is the event on which a process is paused orsleeping.

NAME is the name of the process.

FLAGS are the process flags.

A process that has died but still has an entry in the processtable is called a zombie process.