What are the five process states in the Linux kernel ?

The five process states in the Linux kernel are as follows −

  • Running − This is a state where a process is either in running or ready to run. It is the most active state of all. In this state, the process is getting system resources.

  • Interruptible − This state is a blocked state of a process which waits for an event or a particular time slot.

  • Uninterruptible − It is also a blocked state and it has a timeout value before going to sleep. It will awake when the timeout value sets off.

  • Stopped − Once the process is completed, this state occurs and this process can be restarted.

  • Zombie − It is a dead process and it will be terminated and the information will still be available in the process table.

The five process states in Linux Kernel are depicted below −

The purpose of fork(), exec() and wait() are as follows −

  • fork() − The fork() system call is used to create a new process (child's) that is identical to the old process(parent). The kernel will assign a new process structure to the child process. If the return value is 0, then it belongs to the child process, or else it belongs to the parent process.

  • exec() − The exec() system call replaces the currently running process with a new process.

  • wait() − The wait() system call lets the parent process wait until all child processes have been completed. The wait() call returns immediately if the child process terminates.

Updated on: 01-Dec-2021


Kickstart Your Career

Get certified by completing the course

Get Started