PCBs and Hardware State
When a process is running its Program Counter, stack pointer, registers, etc., are loaded on the CPU (I.e., the processor hardware registers contain the current values)
When the OS stop running a process, it saves the current values of those registers into the PCB for that process.
When the OS is ready to start executing a new process, it loads the hardware registers from the values stored in that process’ PCB.
The process of switching the CPU from one process to another is called a context switch. Timesharing systems may do 100s or 1000s of context switches a second!