Linux OS Internals (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What are Zombie Processes and Orphan Processes?
junior Levellinux-osBasic
In Simple Words:
- Orphan Process: A child process whose parent died while the child was still running.
- Outcome: Automatically adopted by PID 1 (
init/systemd), which monitors it until termination. Harmless.
- Outcome: Automatically adopted by PID 1 (
- Zombie Process (
<defunct>): A child process that has finished execution (exit()), but its parent has not yet read its exit status viawait()/waitpid():- The process holds no RAM or CPU, but occupies a slot in the operating system Process Table.
- Danger: If thousands of zombies accumulate, the system runs out of Process IDs (
/proc/sys/kernel/pid_max), preventing any new processes from spawning!