
Introduction
This article will explain Process Control Block (PCB), a data structure for storing data about a particular process. The CPU needs this information to complete the process.
The Operating System generates the process control block using the Process characteristics (PCB). The process context is another name for this.

Multiprogramming vs Multitasking
Process Attributes
The following are the attributes that are kept in the PCB.
Process ID
Each process is given a unique id when it is created, and this id is used to identify it across the system.
Program counter
A program counter keeps track of the last command executed by the process before it was interrupted. When the CPU resumes the execution of this process, it utilizes this address.
- The program's first instruction address is used to initialize the program counter before it is executed.
- The program counter's value is automatically updated and increased to refer to the next instruction when each instruction is executed.
- This procedure continues till the program ends.
Process State
The Process moves through several phases from start to finish, including new, ready, operating, and waiting. We will go through them in further depth later.
Priority
Every procedure has its own set of priorities. The CPU is given to the process with the highest priority. The process control block also stores this information.
General Purpose Registers
Each process has a unique collection of registers used to store data created during the process execution.
- General-purpose registers are used to store data created during the execution of a task.
- Each process has its own set of registers, which its PCB keeps track.
List of open files
Every process utilizes files that must be present in the main memory during execution. The OS also keeps track of the open files on the PCB.
List of open devices
The operating system also keeps track of all available devices used throughout the process execution.
You can also read about layered structure of operating system.
Must Read Evolution of Operating System