The following table summarizes the possible process states in UNIX operating system and shows that a UNIX process at any given point of time has one of these nine (9) states.
Table 3.9 UNIX Process States
User Running Executing in user mode.
Kernel Running Executing in kernel mode.
Ready to Run, in
Memory Ready to run as soon as the kernel schedules it.
Asleep in Memory Unable to execute until an event occurs; process is in main memory (a blocked state).
Ready to Run,
Swapped Process is ready to run, but the swapper must swap the process into main memory before the kernel can schedule it to execute.
Sleeping, Swapped The process is awaiting an event and has been swapped to secondary storage (a blocked state).
Preempted Process is returning from kernel to user mode, but the kernel preempts it and does a process switch to schedule another process.
Created Process is newly created and not yet ready to run.
Zombje Process no longer exists, but it leaves a record for its parent process to collect.
The Zombie state is used by UNIX to denote that a process was terminated.
In the job interview, you are asked:
Why does UNIX need to use a state to represent a process that was terminated?
Possible Interpretations of the above question include:
• How is the Zombie state used?
• Is the Zombie state really useful?