What are the process states in Windows and Linux?

Operating SystemHardwareSoftware & Coding

A process is not only a program under execution but it is the active state of the program when it is executing and it has its own Process Control Block.

A process requires other resources like memory, CPU, hard disk, and Input/Output, etc.

A process has five states as given below −

  • New − The new state of a process means the process is just created and it is stored onto the hard disk. This process will be picked by the operating system into the main memory. The new state is the initial state.

  • Ready − The ready state of a process means the process is waiting for the CPU to be assigned. The new state processes are picked from the secondary memory by the operating system and put into the main memory. whereas the short term scheduler selects the process from the ready queue.

  • Executing − The executing state of a process means the process is running and CPU is allocated to this process to complete the required action done by this process.

  • Waiting − The waiting state is a state in which the process is waiting for some resources that may be held by the other process. If the process gets the required resources then it will go into the ready state for further execution.

  • Terminated − This is the last state of a process in which the process will terminate and the life cycle of that process will end with this state.

In the Linux operating system, if the parent process will terminate then all associated child processes will be forced to exit but,

In the Windows operating system, the child process will continue running if their parent process terminated.

When a process is terminated but its status is not read by the parent process yet then the process is known as a zombie process.

Zombie process is a process on UNIX and Unix-like computer operating systems that have finished the execution of a process but has still an entry in the process table that means it is a process in terminated state.

raja
Published on 30-Nov-2021 11:08:31
Advertisements