What is Zombie Process and Orphan Process?
Answer:
Zombie
On Unix operating systems, a zombie process or defunct process is a process that has completed execution but still has an entry in the process table, allowing the process that started it to read its exit status. In the term's colorful metaphor, the child process has died but has not yet been reaped.When a process ends, all of the memory and resources associated with it are deallocated so they can be used by other processes. However, the process's entry in the process table remains. The parent is sent a SIGCHLD signal indicating that a child has died; the handler for this signal will typically execute the wait system call, which reads the exit status and removes the zombie. The zombie's process ID and entry in the process table can then be reused. However, if a parent ignores the SIGCHLD, the zombie will be left in the process table. In some situations this may be desirable, for example if the parent creates another child process it ensures that it will not be allocated the same process ID.
A zombie process is not the same as an orphan process. Orphan processes don't become zombie processes; instead, they are adopted by init (process ID 1), which waits on its children.
The term zombie process derives from the common definition of zombie�an undead person.
Zombies can be identified in the output from the Unix PS command by the presence of a "Z" in the STAT column. Zombies that exist for more than a short period of time typically indicate a bug in the parent program. As with other leaks, the presence of a few zombies isn't worrisome in itself, but may indicate a problem that would grow serious under heavier loads.
To remove zombies from a system, the SIGCHLD signal can be sent to the parent manually, using the kill command. If the parent process still refuses to reap the zombie, the next step would be to remove the parent process. When a process loses its parent, init becomes its new parent. Init periodically executes the wait system call to reap any zombies with init as parent.
Orphan
An orphan process is a computer process whose parent process has finished or terminated.A process can become orphaned during remote invocation when the client process crashes after making a request of the server.
Orphans waste server resources and can potentially leave a server in trouble. However there are several solutions to the orphan process problem:
- Extermination is the most commonly used technique; in this case the orphan process is killed.
- Reincarnation is a technique in which machines periodically try to locate the parents of any remote computations; at which point orphaned processes are killed.
- Expiration is a technique where each process is allotted a certain amount of time to finish before being killed. If need be a process may "ask" for more time to finish before the allotted time expires.
A process can also be orphaned running on the same machine as its parent process. In a UNIX-like operating system any orphaned process will be immediately adopted by the special "init" system process. This operation is called re-parenting and occurs automatically. Even though technically the process has the "init" process as its parent, it is still called an orphan process since the process which originally created it no longer exists.
First answer by Ranger22. Last edit by Pithikos. Contributor trust: 1
[recommend contributorrecommended].
Question popularity: 21
[recommend question].
Can you answer these Computers questions?
Related topics:
Shopping for Computers deals?
Find Coupons and Promo Codes on Coupons by Answers.com
Why join?
Joining is free and easy. You can still be anonymous; just choose any username and password.- Get notified about updated answers
- Follow your favorite categories
- Get credit for your contributions
- Customize your profile
- Answer questions more easily
Lost your password?
You may already have an Answers.com account.
Click here to connect your accounts.
If you don't want to connect accounts, you can start a new one from scratch.
Click here to connect your accounts.
If you don't want to connect accounts, you can start a new one from scratch.
Minor details...
Connect your accounts...
Why do we need your email address?
We will use your email address to send you updates (if you request them) about questions you ask, answer or track, and to help you retrieve your password if you forget it.Your email address will not be used for any other purpose without your permission.
Already have an Answers.com account? Connect your accounts!
By doing so, you include all of your history (contributions, messages, profile) from your Answers.com account in your Facebook account.If you don't connect accounts, your new account will be starting from scratch.
Home
Welcome
Help center
Browse categories
- Animal Life
- Business & Finance
- Cars & Vehicles
- Entertainment & Arts
- Food & Cooking
- Health
- History, Politics & Society
- Hobbies & Collectibles
- Home & Garden
- Humor & Amusement
- Jobs & Education
- Law & Legal Issues
- Literature & Language
- Relationships
- Religion & Spirituality
- Science
- Shopping
- Sports
- Technology
- Travel & Places
- WikiAnswers Local
Random question
Community forum

