Process Control Block (PCB)

From COMP15212 Wiki
On path: Processes 1: Processes • 2: Context • 3: Process Control Block (PCB) • 4: Multi Threading • 5: Threads • 6: Interprocess Communication • 7: Process Scheduling • 8: Scheduler • 9: Process States • 10: Process Priority
Depends on ProcessesContext

Not to be confused with a hardware Printed Circuit Board!

The control block (other names are sometimes used) is the operating system’s ‘definition’ of a process. It holds information about a process, such as its identifier (‘PID’ in Unix) and its priority.

A PCB will also hold (or point to) the parts of the process’ context which are preserved when the process is not actively running. Depending on the particular ISA these probably include register values, its memory allocation, which files it has opened, any I/O devices which it has ‘ownership’ of etc.

The exact details stored depend on the particular operating system, but (hopefully) you get the idea!

PCB

A typical implementation of a PCB probably includes one (or more) potential links which can point to other PCBs so they can be assembled into linked lists – which makes it convenient to form queues; an example is the (“ready”) queue of processes waiting to take a ‘turn’ on the processor.


The PCB is another example of metadata – in this case describing the process.


Also refer to: Operating System Concepts, 10th Edition: Chapter C.5.1, pages C.19-C.21


Articles on Processes
About this resource • Atomicity • Containers • Context • Context Switching • Daemons • Fork Unix • Hypervisor • Idle • Interprocess Communication • Multi Threading • Mutual exclusion • Pipes • Pointer Arithmetic • Process Control Block (PCB) • Process Priority • Process Scheduling • Process States • Processes • Queues • Queues Extra • Race Conditions • Real Time • Resources • Scheduler • Signal and Wait • Sleep • Starvation • Synchronisation • Thrashing • Threads • Unix Signals