zombie and orphan process

What are zombie and orphan processess.Can u provide some example.
debarunberaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jlevieCommented:
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
GnsCommented:
> 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jlevieCommented:
Glen is correct.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

milanygandhiCommented:
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
GnsCommented:
I gave the first correct answer.

-- Glenn
0
Karl Heinz KremerCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.