Middle
What is the difference between a zombie process and an orphan process?
sobes.tech AI
Answer from AI
A zombie process is a process that has finished execution, but its parent process has not yet called wait() to retrieve its exit status. Such a process remains in the process table with a "zombie" state, occupying a PID but not consuming CPU or memory resources.
An orphan process is a process whose parent has finished before it. In Unix systems, such processes automatically become children of the init process (PID 1), which then takes responsibility for their proper termination.
In summary:
- Zombie — a finished process waiting for its parent to collect its status.
- Orphan — a living process that has lost its parent, automatically adopted by
init.