Process Control Block in Operating System

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 operating system(OS)

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.

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription