Course contentsShow
← Computer Science
Lesson 1217 of 2,87228. Operating Systems FundamentalsFree lesson

Process Control Block (PCB)

Understand the PCB structure that stores process state, registers, and metadata.

What You'll Learn

You'll learn what the Process Control Block (PCB) is and how it stores all the essential information the operating system needs to manage a running process.

The PCB: A Process's Complete Dossier

Think of the Process Control Block (PCB) as a detailed file folder the operating system keeps for each running process. Just as a doctor maintains a patient chart with vital signs, medical history, and current medications, the OS maintains a PCB containing everything it needs to know about a process.

When the OS switches between processes (which happens constantly), it must save the current process's state perfectly so it can resume later exactly where it left off. The PCB is that saved state.

What's Inside a PCB?

The PCB is a data structure stored in kernel memory that contains:

  • Process ID (PID): A unique identifier for the process
  • Process state: Whether the process is running, ready, waiting, etc.
  • Program counter: The address of the next instruction to execute
  • CPU registers: Contents of all general-purpose, index, and stack registers
  • Memory management information: Base/limit registers, page tables, or segment tables
  • Scheduling information: Priority, scheduling queue pointers, CPU time used
  • I/O status: Open files, allocated devices, pending I/O operations
  • Accounting data: CPU time consumed, time limits, process numbers

Why This Matters

Without the PCB, the OS couldn't multitask. When your computer switches from your web browser to your music player and back, it's the PCB that ensures both processes pick up exactly where they left off—with correct register values, memory state, and open files intact.

Key Takeaway: The Process Control Block is the operating system's master record for each process, storing all process state, register contents, and metadata needed to pause, resume, and manage that process throughout its lifetime.