what is zombie process?
When a process ends, all of the memory and resources associated with it are de-allocated so they can be used by other processes. However, process’s entry in the process table remains.
The job of the parent process is to remove the terminated child process by removing the entry from the process table. If the parent process failed to remove the entry from the table then that particular process will become zombie process. So how the child is going to indicate the parent about its termination means, to the parent-child is going to send a SIGCHLD indicating that child has died, the parent as to have the handler for this signal and this signal handler will typically use wait () system call and it is going to remove the zombie. So if these zombies are removed means process id and entry in the process table can then be reused.
However, if a parent ignores the SIGCHLD means the zombies will be left in the process table. So this is the meaning of zombie process.
So how to see these zombie process, how do this zombie will look means, without any zombies if I give ps command means it is going to list like this – which are the currently running process in that particular terminal it is going to indicate.
If I have a zombie means it is going to list that process with defunct as the symbol.
Note: The author is a Faculty working at ISM UNIV
- ANITHA S