Spiegato, Home

Technology and Gadgets

What is a Zombie Process?

  • Published by Spiegato
  • 2 min read

A zombie process is an instance of a computer program that retains a process table record despite having finished executing. Defunct processes like these are typically associated with Unix® and other similar operating systems due to the way they handle child processes. When a child process has finished executing, the parent is typically responsible for removing it from the process table. It is usually not possible to directly remove a zombie process with the kill command, though the parent can often be made to remove it if the operator uses the signal child (SIGCHLD) notification. Failing this, a zombie process may be removed indirectly by killing the parent.

Zombie process is a metaphorical descriptive term that makes reference to the living dead. Defunct processes in Unix® and similar operating systems can be seen as analogous to zombies in that they maintain a process table presence despite no longer performing their intended functions. When a process has finished executing it is sometimes said to have died, while the means by which the operating system recovers its process table allocation may be known as reaping. The parent process of a zombie is technically supposed to reap its children, though this does not always happen.

There are certain cases where the existence of a zombie process may be intentional or even desired. After a child process has ceased execution, the parent may need to run another instance of the same program later. If a zombie has not been removed from the process table, a new child will not be assigned the same identification (ID) as the old child. Certain programs may benefit from or even require this sort of differentiation.

If a parent process has not executed the wait command to reap zombies it is responsible for, it may be possible to force the issue. This is typically done via the kill command and sending the SIGCHLD signal to the parent process. If everything is working properly, a parent process that receives this signal should reap its zombie children so that their IDs and process table positions can be reused.

Under certain circumstances, a parent process may ignore the SIGCHLD signal. If this occurs and the operator still desires that the process table be cleared, the parent process may be killed. Any zombies that the parent process created will then be be assigned as children to the init process. Since init periodically initiates the wait command on its children, any zombies it is responsible for will eventually be removed from the process table.

Key terms in this article

Related articles

  • What is a Zombie Computer?

    A zombie computer, or “drone,” is a computer that has been secretly compromised by hacking tools which allow a third party to control the computer and its…

  • How Do I Recognize a Zombie Computer?

    Recognizing a zombie computer can be incredibly difficult, because many of the signs can point to other problems, and most people do not know they are…

  • What Is a Baseband Processor?

    Mobile phones and other devices typically require considerable processing power to control their computational and communications functions. The Central…

  • What is the ITIL® Process?

    The Information Technology Infrastructure Library (ITIL®) process, also called the service lifecycle, is a best practices system for improving IT…

  • What is Online Analytical Processing?

    Online analytical processing (OLAP) is a method of using multidimensional databases to support quick reporting, frequently involving trend-analysis. The…