Linux — Unveiling the Mysteries of Zombie Processes

Tony
6 min readJun 21, 2024

Perhaps few are aware that when a process calls “exit,” it doesn’t immediately disappear. Instead, it leaves behind a data structure known as a “Zombie” process. Among the five states of Linux processes, the Zombie process is particularly unique.

It has relinquished almost all memory space, lacks any executable code, cannot be scheduled, and merely occupies a position in the process list, recording the exit status and other information for other processes to collect. Apart from this, Zombie processes no longer occupy any memory space.

However, before we introduce and troubleshoot Zombie process, let’s first understand what is “process status” in Linux.

Process Status in Linux

When iowait rises, it indicates that the process may be stuck in an uninterruptible state for an extended period due to the inability to receive a response from the hardware. Uninterruptible processes can be identified in the output of the ps or top command by their state, typically denoted as D for Disk sleep.

top and ps are widely utilized tools for monitoring process status. Let’s begin with examining the output of top. Below is an illustrative example of top output:

top - 10:27:35 up 1 day,  3:32,  1 user,  load average: 0.30, 0.24, 0.18…

--

--