| All operating systems have some means of
managing tasks. The UNIX network operating system manages tasks using processes.
Processes can be initiated by either the operating system or by users.
The majority of tasks you perform in the UNIX environment start a
process. A Process can start or spawn a subprocess, thus
creating a process hierarchy or tree similar to the file system
structure with parent / child relationships. When you use vi to edit a
file, or when sending a file to the printer with the
lp
command, a process is spawned. Some
simple commands, such as
cd,
are executed by the shell itself and do not create a separate process.
Each program you run creates a process which is assigned a unique process
identification number (PID). The PID is used by the
system to identify and track the process until it has completed.
The operating system (OS) kernel
manages the initiation and termination of all processes. Every process
requires system resources such as central processing unit (CPU) time
and random access memory (RAM) space to work in. The OS allocates
these system resources to each process when it starts and de-allocates
them when the process ends. The first two processes started when a
UNIX system is booted are the
sched
(scheduler) and
init
(initialization) which manage other
processes. The Figure shows the relationships
between the OS kernel, CPU, RAM, and processes.
|