What is a Process?
• A process is a program during execution.
• A process is the basic unit of execution in an operating system.
• Different processes may run different instances of the same
• At a minimum, process execution requires following resources:
• Memory to contain the program code and data.
• A set of CPU registers to support execution.
• The OS builds a data structure to manage the process.
• Traditionally, the OS created all processes
• But it can be useful to let a running process create another.
• This action is called process spawning
• Parent Process is the original, creating process.
• Child Process is the new process.
• There must be some way that a process can indicate
• This indication may be:
• A HALT instruction generating an interrupt alert to the
• A user action (e.g. log off, quitting an application)
• A fault or error
• Parent process terminating
Process Life Cycle
• Processes are always either executing, waiting to execute or
blocked waiting for an event to occur.
• As a process executes, it changes state:
new: The process is being created.
running: Instructions are being executed.
waiting: The process is waiting for some event to occur.
ready: The process is waiting to be assigned to a processor
terminated: The process has finished execution.
• Processor is faster than I/O so all processes
could be waiting for I/O device.
• Swap these processes to disk to free up more memory
and use processor on more processes..
• Blocked state becomes suspend state when
swapped to disk.
• Two new states