A process control block (PCB) stores data about the process, such as registers, quantum, priority, and so on. The process table refers to an array of PCBs, which means that it logically contains a PCB for each of the system’s active processes.
In this article, we will dive deeper into the Process Control Block according to the GATE Syllabus for (Computer Science Engineering) CSE. Let us read ahead to learn more.
Table of Contents
- What is the Process Control Block?
- Process Attributes
- Process Id
- Program Counter
- Process State
- Priority
- General Purpose Registers
- List of Open Files
- List of Open Devices
- Important Notes
What is the Process Control Block?
A Process Control Block (PCB) refers to a data structure that keeps track of information about a specific process. The CPU requires this information to complete the job.
A process’s Process Control Block looks like this:
Each process has its own PCB (process control block) that identifies it.
It is also referred to as the context of the process.
Process Attributes
Here are the various attributes of any process that is stored in the PCB:
Process Id
The process Id is a one-of-a-kind identifier for each system process. Each process is given a unique identifier when it is created.
Program Counter
The address of the next instruction to be executed is specified by the program counter. The address of the program’s first instruction is used to initialize the program counter before it is executed.
The value of the program counter is incremented automatically to refer to the next instruction when each instruction is executed. This process continues till the program ends.
Process State
Throughout its existence, each process goes through various phases. The present state of the process is defined by the process state.
Priority
The priority of a process determines how important it is to complete it.
Among all the processes, the one with the greatest priority receives the most CPU time.
General Purpose Registers
General-purpose registers are used to store data created during the execution of a task. Each and every process consists of its own set of registers, which its PCB keeps track of.
List of Open Files
Each process necessitates the presence of certain files in the main memory during execution. During the process’s execution, PCB keeps track of the files it uses.
List of Open Devices
During the procedure’s execution, PCB keeps track of all open devices.
Important Notes
- Each process’s PCB is stored in the main memory.
- Each process has only one PCB associated with it.
- All of the processes’ PCBs are listed in a linked list.
Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus, GATE Previous Year Question Paper, and more.
Also Explore,
- Batch Operating System
- Binary Semaphores in Operating System
- Contiguous Memory Allocation in Operating System
- Counting Semaphores in Operating System
- Deadlock Detection and Recovery in Operating System
- Deadlock Prevention in Operating System
- Distributed Operating System
- Dynamic Partitioning in Operating System
- Fixed Partitioning in Operating System
- Functions of Operating System
- Methods for Handling Deadlock in Operating System
- Multiprogramming Operating System
- Multitasking Operating System
- Network Operating System
- Non-Contiguous Memory Allocation in Operating System
- Operating System Services
- Paging in OS
- Process in Operating System
- Process Scheduler in Operating System
- Process Scheduling in Operating System
- Process State in Operating System
- Real-Time Operating System
- Resource Allocation Graph in Operating System
- Semaphores in Operating System
- Time-Sharing Operating System
- Types of Operating System
Comments