Process Control Block in Operating System

Introduction

In an operating system, the OS performs several operations whenever a process is created. The process identification number (PID) has been assigned to each process in order to identify the process. Since the operating system supports multiprogramming, there it is possible to keep the track of all the processes. The PCB is responsible to keep the track of the process execution status. Each block in PCB has information on the process state, program counter, stack pointer, etc. All of this information must be saved when during the process of context switching. During the transition from one process to another, the information should be reflected in the PCB.

The process table is a data structure tracked by the operating system to coordinate the processes like context switching and scheduling. Each item in the process table is known as context block. It contains the meta information about a process like process name and state. The exact content of the process table entirely depends upon the operating system. Some of the information stored by a process table is given below:

Structure Process Control Block

1. Pointer: The pointer is a stack pointer and it must be saved when a process gets transist from one process to another in order to keep the current position of the pointer.

2. Process state: It keeps the track of the respective state of the process.

3. Process number: Each process has a unique id called as process ID or PID that stores process identifier.

4. Program counter: This keep the record of the counter that has the address of the instruction that should be executed next for the process.

5. Register: It is part of the CPU that includes accumulator, base, registers etc.

6. Memory limits: This fields has the information of memory management system used by the operating system. It may contains segment tables etc.

7. Open files list: This keep the information of the list of files that are opened for a process.

8. Miscellaneous accounting and status data: This keeps the information regarding the amount of the CPU has been used, time constraints etc.

Conclusion

In this article, we discussed process table and process control block. We saw different stats of the process table in detail. We believe that this tutorial has been knowledge for you.