Open In App

Different types of Processes in Process Table

Last Updated : 23 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

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:

  1. New Process
  2. Ready Process
  3. Running Process
  4. Blocked / Waiting Process
  5. Terminated Process
  6. Zombie Process
  7. Orphan Process
  8. 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.



Next Article

Similar Reads