Process Control Block in Operating System (OS)

What is a process control block or PCB?

PCB or Process control Block is a data structure which has all the information that is needed by a schedular to schedule a particular process, this data structure rests in the operating system Kernel.

Process Control Block in OS Operating System

Process ID or PID

This basically is an unique integer ID for a particular process being carried out. The PCB keeps the track of this and other relevant information related to any process.

The following are kept track of by the PCB –

  1. Process ID or PID – Unique Integer Id for each process in any stage of execution.
  2. Process Stage – The state any process currently is in, like Ready, wait, exit etc
  3. Process Privileges – The special access to different resources to the memory or devices the process has.
  4. Pointer – Pointer location to the parent process.
  5. Program Counter – It will always have the address of the next instruction in line of the processes
  6. CPU Registers – Before the execution of the program the CPU registered where the process needs to be stored at.
  7. Scheduling Information – There are different scheduling algorithms for a process based on which they will be selected in priority. This section contains all the information about the scheduling.
  8. Memory Management Information – The operating system will use a lot of memory and it needs to know information like – page table, memory limits, Segment table to execute different programs MIM has all the information about this.
  9. Accounting Information – As the name suggest it will contain all the information about the time process took, Execution ID, Limits etc.
  10. I/O Status – The list of all the information of I/O the process can use.

The PCB architecture is completely different for different OSes. The above is the most generalised architecture.

Please Login/Signup to comment