- 2069 Bhadra · 2 marks
- Year not given
Process control block
Short answer
A Process Control Block (PCB) is a kernel data structure storing all process information: PID, state, program counter, CPU registers, memory info, open files, scheduling priority, and accounting data. It is saved during context switches, enabling multitasking.
What is Process Control Block? Explain in detail.
A Process Control Block (PCB), also called a task control block, is a data structure kept by the operating system for every process. It holds all the information needed to manage the process and to resume it correctly after it has been stopped. The PCB is created when the process is created and removed when it terminates; it is the "identity card" of the process. All PCBs are kept in the process table.
Contents of a PCB
+---------------------------+
| Process ID (PID), parent |
| Process state |
| Program counter |
| CPU registers, stack ptr |
| Scheduling info: priority |
| Memory info: base/limit, |
| page tables |
| I/O status: open files, |
| devices allocated |
| Accounting: CPU time used |
+---------------------------+
- Process identification: PID, parent PID, user ID.
- Process state: new, ready, running, waiting, terminated.
- Program counter: address of the next instruction.
- CPU registers: accumulators, index registers, stack pointers, status flags; saved on interrupt.
- CPU-scheduling information: priority, pointers to scheduling queues.
- Memory-management information: base/limit registers, segment or page tables.
- I/O status information: list of open files and allocated I/O devices.
- Accounting information: CPU time used, time limits, job number.
Use
During a context switch the OS saves the state of the running process in its PCB and loads the state from the PCB of the next process. Hence PCB makes multitasking possible.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Digital control system block diagram and advantages · Digital Control System, chapter 1 · asked 3×
- Case study: critical factors in process control · Instrumentation II, chapter 10 · asked 2×
- Define control system and closed loop block roles · Control Systems, chapter 1 · asked 5×
- PID control operation with block diagram · Embedded System, chapter 7 · asked 4×