Process: The Process States In Operating System/ What are the 5 basic states of a process?

Hello Friends, In this blog post I am going to let you know about the process and different types of process states which are used in the operating system.

A process is a program in execution. It consists of an executable program, the program’s data and stack, its program counter, stack pointer, and other registers, and all the other information needed to run the program.

A program by itself is not a process. A program is a passive entity, such as the content of a file stored on disk whereas a process is an active entity, with a program counter specifying the next instruction to execute and a set of associated resources.

States of the process/ How many states are there in the process?/ What are the 5 basic states of a process?

A process goes through a series of discrete process states. various events can cause a process to change states. The state of a process is defined in part by the current activity of that process. A process may be in one of the following states:

New: The process is being created.
Running: Instructions are being executed.
Waiting: The process is waiting for some event to occur such as an I/O completion or reception of a signal.
Ready: The process is waiting to be assigned to a processor.
Terminated: The process has finished execution.

A state diagram corresponding to these states is shown in fig 1 below.

process-states
Process States

Process control block:

Each process is represented in the operating system by a process control block (PCB) or a task control block. A PCB is shown in fig 2.

It is a data structure containing certain important information about the process including the following.

processcontrolblock

Process state: The state may be new, ready, running, waiting, halted, and so on.

Program counter: The counter specifies the address of the next instruction to be executed for this process.

CPU Register: They include accumulators, index registers, stack pointers, and general-purpose registers, plus any condition-code information. Along with the program counter, this state information must be saved to continue the process correctly afterward, when an interrupt occurs.

CPU – Scheduling information: It includes a process priority, pointers to scheduling queues, and any other scheduling parameters.

Memory Management Information: It includes information such as the value of the base and limit registers, the page tables, or the segment tables, depending on the memory system used by the operating system.

Suspend(Processname): Ready -> suspended ready
A suspended ready process may be made ready by another process. It makes the transition.

Resume(Processname) : suspended ready -> ready
A blocked process may be suspended by another process. It makes the transition.

Suspended(Processname): blocked -> suspended blocked
A suspended blocked process may be resumed by another process. It makes the transition.

Resume(Processname) : suspended blocked -> blocked

You can also go through a few more amazing blog links below related to operating systems:

disk scheduling क्या होती है…
FAT32 Advantages and Disadvantages…
Overlay advantages and disadvantages in programs…
What is the use of Cache Memory…
What is Linker? Why is it required?…
types Of File Operations…
What are the file Organisation and its types…
Dijkstra: Bankers Algorithm For Deadlock Avoidance…
What is a thread in the operating system with an example…
Cache Memory In Hindi…
Linker In Hindi…
What Is Multithreading models in Hindi…
Dynamic Storage Problem In OS In Hindi…
Process states in the Operating system in Hindi…
FAT32 Advantages And Disadvantages In Hindi…
Critical Section Problem With a Simple Example…
Critical Section Problem In OS In Hindi…
Dijkstra Algorithm In Hindi|Banker’s Algorithm In Hindi…
What Is Dynamic Storage Problem…
What are the Fork and Exec system calls…
Multithreaded Process: Benefits & Models…
The Process States In Operating System…

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post about the process and its different types of states in the operating system.

Please feel free to give your important feedback in the comment section below.

Have a great time! Sayonara!

Anurag

I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.