Difference between Zombie, Orphan and Daemon Processes
1. Zombie Process :
A Zombie is a process that has completed its task but still, it shows an entry in a process table. The zombie process usually occurred in the child process. Very short time the process is a zombie. After the process has completed all of its tasks it reports the parent process that it has about to terminate.
Zombie is unable to terminate itself because it is treated as a dead process. So parent process needs to execute to terminate the command to terminate the child.is
2. Orphan Process :
A child process that remains running even after its parent process is terminated or completed without waiting for the child process execution is called an orphan. A process becomes an orphan unintentionally. Some time intentionally becomes orphans due to long-running time to complete the assigned task without user attention. The orphan process has controlling terminals.
3. Daemon process :
Daemon processes are started working when the system will be bootstrapped and terminate only when the system is shutdown .It does not have a controlling terminal. It always runs in the background.
Difference between Zombie, Orphan, and daemon Processes:
|1.||A Zombie is a process that has completed its task but still, it shows an entry in a process table.||A child process that remains running even after its parent process is terminated or completed without waiting for the child process execution is called an orphan.||A daemon process is a system-related process always running in the background.|
|2.||Zombie process states always indicated by Z||The orphan process was created unknowingly due to a system crash.||Daemon process state indicated by ? in the field of tty column in the output|
|3.||The zombie process has controlling terminals||Orphan The zombie process has controlling terminals.||The daemon process does not have controlling terminals.|
|4.||The zombie process treated as dead they are not used for system processing||An orphan process is a computer process even after their parent terminates init is become a parent and continue the remaining task.||A program that runs for a long time makes them as a daemon process and runs it in the background.|
|5.||To remove the zombie process execute the kill command.||Terminate the Orphan process use the SIGHUP signal.||Daemon process only when system shutdown.|