Different types of Processes in Process Table
Last Updated : 23 Jan, 2025
The process table is a data structure used by the operating system to keep track of all processes. It is the collection of Program control Blocks (PCBs) which contains information about each process, such as its ID (PID), current state (e.g., running, ready, waiting), CPU usage, memory allocation, and open files.
- The process table helps the operating system manage processes efficiently by tracking their progress and resource usage.
- Each entry in the table corresponds to one process, and the operating system updates it as the process moves through different states inits lifecycle.
Process states
The states of a process represent the different stages a process goes through during its lifecycle in an operating system. A process can be in states such as new, ready, running, waiting, or terminated, depending on what it is doing and the resources it needs. These states help the operating system manage processes efficiently, ensuring that tasks are executed smoothly and system resources are used effectively.
read more about - States of a Process in Operating Systems
Different types of processes in process table can be:
- New Process
- Ready Process
- Running Process
- Blocked / Waiting Process
- Terminated Process
- Zombie Process
- Orphan Process
- Daemon Process
1. New (Created) Process
A process that has been created but is not yet ready for execution. It remains in this state until the operating system assigns the necessary resources.
2. Ready Process
It is the process that is ready to be loaded into the main memory. This process is ready to run and is waiting to get the CPU time for its execution. Processes that are ready for execution by the CPU are maintained in a queue called a ready queue for ready processes.
3. Running Process
A process that is currently being executed by the CPU. Only one process (or more in multicore systems) can be in the running state at a time.
4. Blocked (Waiting) Process
A process that is waiting for an event to occur, such as input/output (I/O) completion or a resource becoming available. It cannot continue execution until the required condition is met.
5. Terminated Process
A process that has completed its execution or has been explicitly killed. It remains in the process table briefly until the operating system removes it.
6. Zombie Process
A zombie process is a process that has completed its execution but still remains in the process table because its parent process has not yet read its exit status. It is called a "zombie" because it is no longer active or running, but it still exists as a placeholder in the system.
Entry of child process remains in the process table until the parent process retrieves the exit status. During this time, the child process is referred to as a zombie process. This happens because the operating system keeps the process table entry to allow the parent to gather information about the terminated child.
read more about - Zombie Processes and their Prevention
7. Orphan Process
An orphan process is a child process currently performing its execution, whose parent has finished its execution and has terminated, leaving the process table without waiting for the child process to finish. Orphan processes are still active and continue to run normally, but they no longer have their original parent process to monitor or control them.
read more about - Orphan Process
8. Daemon Process
A daemon process is a background process that runs independently of any user control and performs specific tasks for the system. Daemons are usually started when the system starts, and they run until the system stops. A daemon process typically performs system services and is available at all times to more than one task or user. Daemon processes are started by the root user or root shell and can be stopped only by the root user.
read more about - Daemon Process
Conclusion
The process table is a vital component of an operating system, helping to track and manage all active processes efficiently. Understanding the different process states and types, such as new, ready, running, waiting, terminated, zombie, orphan, and daemon processes, provides a clear picture of how the operating system handles multitasking and resource allocation. Each process type plays a unique role in the system's lifecycle, ensuring smooth execution of tasks and optimal use of system resources. By learning about these concepts, we gain insights into the inner workings of operating systems and their process management techniques.
Similar Reads
Process Scheduler: Job and Process States A process scheduler is a part of operating system that decides which process runs next on the CPU. It manages how all the processes get CPU time, especially when multiple processes are waiting to run. Since the CPU can only work on one process at a time (or a few if there are multiple cores), the sc
4 min read
Process Table and Process Control Block (PCB) While creating a process, the operating system performs several operations. To identify the processes, it assigns a process identification number (PID) to each process. As the operating system supports multi-programming, it needs to keep track of all the processes. For this task, the process control
6 min read
States of a Process in Operating Systems In an operating system, a process is a program that is being executed. During its execution, a process goes through different states. Understanding these states helps us see how the operating system manages processes, ensuring that the computer runs efficiently. Please refer Process in Operating Sys
11 min read
Difference Between Process, Parent Process, and Child Process Running program is a process. From this process, another process can be created. There is a parent-child relationship between the two processes. This can be achieved using a library function called fork(). fork() function splits the running process into two processes, the existing one is known as pa
8 min read
Concurrent Processes in Operating System Concurrent processing is a computing model in which multiple processors execute instructions simultaneously for better performance. Concurrent means, which occurs when something else happens. The tasks are broken into subtypes, which are then assigned to different processors to perform simultaneousl
2 min read