What are the process state in Unix ?

4. Zombie State (Z)

The Zombie state, also known as the defunct state, represents a peculiar condition where a process has completed execution but still has an entry in the process table. This occurs when a child process terminates but its parent process hasn’t yet collected its exit status through the wait() system call.

Zombie processes don’t consume system resources like CPU time or memory (except for the process table entry), but they do occupy a PID. In normal circumstances, zombie processes are temporary and are cleaned up when the parent process retrieves the child’s exit status. However, if the parent process fails to collect this information or terminates without doing so, zombies can accumulate.

The kernel maintains zombie processes to preserve the exit status and resource usage information that the parent process might need. This design ensures that parent processes can always retrieve information about their terminated children, which is crucial for proper process management and error handling.

Dlightdaily

Author is a passionate Blogger and Writer at Dlightdaily . Dlightdaily produces self researched quality and well explained content regarding HowToGuide, Technology and Management Tips&Tricks.

FacebookTwitterEmailShare

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.