CS Compass Logo

CS Compass

Your CS Navigator

Process Management

Learn how the Operating System manages processes and CPU execution.

What is a Process?

A process is a program that is currently being executed. It contains program code, data, memory, and other resources required for execution.

Program vs Process

Program Process
Passive entity Active entity
Stored on disk Stored in memory
Static Dynamic

Process States

A process generally passes through the following states:

Process Control Block (PCB)

PCB is a data structure maintained by the Operating System that stores information about a process.

CPU Scheduler

The CPU Scheduler selects a process from the ready queue and allocates CPU time to it.

Context Switching

Context Switching is the process of saving the state of one process and loading the state of another process so that CPU execution can continue smoothly.