Zombie vs Orphan vs Daemon Processes

Operating systems manage different types of processes during their lifecycle. Three important categories are zombie processes, orphan processes, and daemon processes. Each serves a different purpose and behaves uniquely in the system.

Zombie Processes

A zombie process is a process whose execution has completed but still has an entry in the process table. This occurs because the parent process needs to read the child's exit status before the process can be fully removed from the system.

Zombie Process Lifecycle Parent Running Child Running Child Zombie Process Reaped Child exits Still in process table wait() called Zombie State: Process finished but entry remains in process table

Once the parent reads the exit status using the wait() system call, the zombie process is eliminated from the process table. This is called reaping the zombie process.

Zombie processes don't consume system resources like memory or CPU, but they retain their process ID. If too many zombies accumulate, they can exhaust available process IDs, preventing new processes from starting.

Orphan Processes

Orphan processes are processes that continue running even after their parent process has terminated. When a process becomes orphaned, the init process (PID 1) automatically adopts it as its new parent.

Orphan processes can be created intentionally or unintentionally:

  • Intentional orphans − Created to run background services or long-running tasks without user interaction

  • Unintentional orphans − Result from parent process crashes or unexpected termination

Process groups can help manage and prevent unintentional orphan processes by ensuring related processes are terminated together.

Daemon Processes

A daemon process is a background process that runs independently of user control. Daemons typically start during system boot and continue running until system shutdown. They provide essential system services and have no controlling terminal.

Daemon Process Characteristics No controlling terminal Runs in background Parent is init (PID 1) Name ends with 'd' Daemon

Common daemon processes include:

  • crond − Job scheduler that runs scheduled tasks in the background

  • syslogd − System logger that collects and manages system log messages

  • httpd − Web server daemon that handles HTTP requests

  • dhcpd − DHCP daemon that automatically assigns IP addresses to network clients

Comparison

Aspect Zombie Orphan Daemon
State Terminated but not reaped Running without parent Background service
Parent Original parent exists Adopted by init Usually init
Resource Usage Only process table entry Normal resource usage Normal resource usage
Purpose Awaiting status collection Continue execution Provide system services

Conclusion

Zombie processes are terminated but await reaping by their parent, orphan processes continue running after parent termination, and daemon processes provide essential background services. Understanding these process types is crucial for effective system administration and process management.

Updated on: 2026-03-17T09:01:38+05:30

6K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements