Unix: Do zombie processes remain in the system forever? Explain
Solution:-
1. In linux we have what called zombie processes, it is a process that has completed its execution.
2. Even if the the process has been executed via the exit system call but is still has the entitty in the process table but in a Terminated state.
3. Zombie process is usually occur for child process as the parent process still needs to read its child exit status.
4. The system keeps this zombie process to keep the exit status for the parent to collect. If the status is collected by the parent using the wait system call then only the zombie process is completely eleminated from the process table.
5. If the parent does not collect the exit status then the zombie processes will stay around forever, So yes the zombie processes can remain in the system forever.
6. If few of these un-collected zombie process is their in the process table then it is ok of the system if their comes more zombie processes then that will create a bug in the UNIX leading to shottage of process table entries.
7. How ever the zombie processes can be eleminated from the system by using the SIGCHLD signal to the parent.
Get Answers For Free
Most questions answered within 1 hours.