Date Archives August 18, 2016

Zombie(Defunct) process vs. Orphan process



Zombie(Defunct) process

  • On Unix and Unix-like computer operating systems, a zombie process or defunct process is a process that has completed execution but still has an entry in the process table.
  • This entry is still needed to allow the parent process to read its child’s exit status.
  • You cannot kill zombie process directly because it is already dead.
  • To kill the zombie process, you should kill the parent process. However if the parent process is init(which is 1), then only thing you can do is reboot.
  • It takes very tiny memory(description info) but will take process ID which is limited. So, it is better not to have zombie process.



Orphan process

  • An orphan process is a computer process whose parent process has finished or terminated, though it remains running itself.
  • parent process ID is changed to init which is 1.
  • It is possible to find the orphan process and kill by kill -9 pid command.
  • It still takes resources, and having too many orphan process will overload init process. It is better not to have many orphan process.