- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Zombie and Orphan Processes in Linux
Details about the zombie, orphan and daemon processes are given as follows
Zombie Processes
A zombie process is a process whose execution is completed but it still has an entry in the process table. Zombie processes usually occur for child processes, as the parent process still needs to read its child’s exit status. Once this is done using the wait system call, the zombie process is eliminated from the process table. This is known as reaping the zombie process.
A diagram that demonstrates the creation and termination of a zombie process is given as follows
Zombie processes don't use any system resources but they do retain their process ID. If there are a lot of zombie processes, then all the available process ID’s are monopolized by them. This prevents other processes from running as there are no process ID’s available.
Orphan Processes
Orphan processes are those processes that are still running even though their parent process has terminated or finished. A process can be orphaned intentionally or unintentionally.
An intentionally orphaned process runs in the background without any manual support. This is usually done to start an indefinitely running service or to complete a long-running job without user attention.
An unintentionally orphaned process is created when its parent process crashes or terminates. Unintentional orphan processes can be avoided using the process group mechanism.
- Related Articles
- Zombie vs Orphan vs Daemon Processes
- How to Find the List of Daemon Processes and Zombie Processes in Linux
- How to execute zombie and orphan process in a single C program?
- What is Zombie Process in Linux?
- Maximum number of Zombie processes a system can handle in C++
- Threads vs Processes in Linux
- How to find and kill running processes in linux
- How to Kill Linux Processes Using ‘xkill’ Command
- What Linux utility for sorting processes by network usage?
- How to find out which processes are using swap space in Linux?
- What are Orphan Blocks?
- How to see top processes sorted by actual memory usage on Linux?
- What are Zombie Computer?
- The Zombie Apocalypse case study - JavaScript
- Synchronization and Pooling of processes in C#
