what are zombies

Bob Toxen bob at cavu.com
Mon Feb 19 10:32:46 EST 1996


> From: David Hamm <dhamm at itserve.com>
> To: "'ALE Mailing List'" <ale at cc.gatech.edu>
> Subject: what are zombies
> Date: Mon, 19 Feb 1996 10:13:02 -0500

> ... I did a ps -x and noticed that several of the daemons were marked
> as  zombie.  ...  Then I = tried to kill -9 them but they would not
> unload from memory...

> Thanks
> David

A zombie is a undead process.  It's not alive but not dead either.

Specificially, when a process dies via exit() or fatal signal, if its
parent is not presently waiting for it with wait() then there is information
about the dead process that must be given to the parent, such as its
exit status, amount of CPU used, etc.

The kernel stores this information in the dead process's process table
entry structure until the parent does a wait().  Note that this takes up
an entry in the process table and can cause you to run out, which seems
to be happening.

You can't kill a zombie because it is not alive.

Since you probably can't get its parent to wait() on it, the alternative is
to kill the parent.  Whenever the parent of a process (alive or zombie)
dies then init becomes its parent and init frequently does a wait() call.

Of course, if init is dead then those zombies probably will be around until
you reboot.

Bob Toxen
bob at cavu.com
http://www.mindspring.com/~cavu
Fly-By-Day Consulting
N79879
"Venimus, Vidimus, Dolavimus" (We came, we saw, we hacked)

Available for C & UNIX programming/porting assignments.






More information about the Ale mailing list