MSCIT 4th COMP2115 6 (1), 6
MSCIT 4th COMP2115 6 (1), 6
Process Concept
An operating system executes a variety of programs:
Batch system – jobs
Time-shared systems – user programs or tasks
Textbook uses the terms job and process almost interchangeably
Process – a program in execution; process execution must
progress in sequential fashion
Process Concept (Cont.)
Program is passive entity stored on disk (executable file),
process is active
Program becomes process when executable file loaded into
memory
Execution of program started via GUI mouse clicks, command
line entry of its name, etc
Process State
emacs tcsch
ps
pid = 9204 pid = 4005
pid = 9298
Process Creation (Cont.)
UNIX examples
fork() system call creates new process
exec() system call used after a fork() to replace the
process’ memory space with a new program
C Program Forking Separate Process
Process Termination