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 Kernel Running Ready to Run,in Memory Asleep in Memory Ready to Run, Swapped Sleeping.Swapped
Executing in user mode. Executing in kernel mode. Ready to run as soon as the kernel schedules it.
Unable to execute until an event occurs; process is in main memory (a blocked state). Process is ready to run, but the swapper must swap the process into main memory before the kernel can schedule it to execute. The process is awaiting an event and has been swapped to secondary storage (a blocked state). Process is returning from kernel to user mode, but the kernel preempts it and does a process switch to schedule another process. Process is newly created and not yet ready to run. Process no longer exists, but it leaves a record for its parent process to collect.
Preempted
Created Zombje
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?