Solved

zombie and orphan process

Posted on 2003-10-30
8
719 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
Comment Utility
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
Comment Utility
> 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
Comment Utility
Glen is correct.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Expert Comment

by:milanygandhi
Comment Utility
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
Comment Utility
I gave the first correct answer.

-- Glenn
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SIP Trunk provider 20 92
What is ISQL? 6 99
Secure host to host communication 5 59
How to clone solaris 10 machine 33 70
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now