04-16-2009
216,
0
Join Date: Dec 2007
Last Activity: 15 December 2019, 8:10 PM EST
Posts: 216
Thanks Given: 2
Thanked 0 Times in 0 Posts
So what’s with the zombies??
A zombie process is a process that has completed execution but still has an entry in the process table. This entry is still needed to allow the process that started the (now zombie) process to read its exit status. The term zombie process derives from the common definition of zombie (an undead person)
In the term's colourful metaphor, the child process has died but has not yet been reaped.
Zombies can be identified in the output from the UNIX ps command by the presence of a “Z” in the “STAT” column. Zombies that exist for more than a short period of time typically indicate a bug in the parent program, the presence of a few zombies is not worrisome in itself, but may indicate a problem that would grow serious under heavier loads. Since there is no memory allocated to zombie processes except for the process table entry itself, the primary concern with many zombies is not running out of memory, but rather running out of process ID numbers.
To remove zombies from a system, remove the parent process. When a process loses its parent, init becomes its new parent. Init periodically executes the wait system call to reap any zombies with init as parent.