Solved

zombie and orphan process

Posted on 2003-10-30
8
735 Views
Last Modified: 2007-12-19
What are zombie and orphan processess.Can u provide some example.
0
Comment
Question by:debarunbera
8 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 9650017
A zombie is process that is not responding to signals, which means that it can't be killed. An orphan is a child of some process that either failed to die on instruction of the parent or failed to die when the parent exited.
0
 
LVL 20

Accepted Solution

by:
Gns earned 125 total points
ID: 9650447
> A zombie is process that is not responding to signals, which means that it can't be killed.
No that would be a process either in state D (non-interrutible waitstate) or which has "actively" disabled the signals. Has nothing to do with zombies.
This snippet from the ps manpage sheds some light on zombie processes:
       Processes  marked  <defunct> are dead processes (so-called
       "zombies")  that  remain  because  their  parent  has  not
       destroyed them properly. These processes will be destroyed
       by init(8) if the parent process exits.
... and this is from a google search on "orphan zombie process"
----------- zombie -------------
zombie process
<operating system> (Or "defunct process") A Unix process that has terminated (either because it has been killed by a signal or because it has called exit()) and whose parent process has not yet received notification of its termination by executing (some form of) the wait() system call.

A zombie process exists solely as a process table entry and consumes no other resources. This entry is retained to hold the child's exit status until the parent process wants to retrieve it. The parent can also be notified asynchronously via a signal of the child's termination.

Zombie processes can be seen in "ps" listings occasionally (with a status "Z" in some versions).

Compare orphan process.

(1997-10-08)
--------------------- Orphan ------------------
orphan process
<operating system> A Unix process whose original parent has terminated and which has become a child of "init(1)".

Compare zombie.

(1996-05-29)
----------------------------------

This "orphaning behaviour" is the same for all Unices, and Linux too. Also note that zombies are to be thought of as mainly harmless notes:-).

-- Glenn
0
 
LVL 40

Expert Comment

by:jlevie
ID: 9651001
Glen is correct.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Expert Comment

by:milanygandhi
ID: 9655799
Zombie :
Linux OS maintains a process table which contains one entry for each process in the system.  Even if a process terminates (eg by system call exit()), its entry still remains in the process table till the parent process does a wai() system call to collect the exit code passed by the child process.  Thus, a zombie process is one which has terminated but the parent hasn't wait()ed for it and hasn't collected its exit code.  A zombie process does not occupy any resource except an entry in the process table.

Orphan process :
suppose  a process(say P1) creates a child process(say P2) using system call fork().  Now assume parent process P1 terminates (say, by making a system call exit())  whereas the child process P2 is still running.  In such a case a special process called init (which has process id 1) becomes parent of child P2 and P2 is called orphan process.
 
0
 
LVL 20

Expert Comment

by:Gns
ID: 10182741
I gave the first correct answer.

-- Glenn
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10231616
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by Gns
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

khkremer
EE Cleanup Volunteer
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question