operating-systems

Definition

Dispatcher

The dispatcher is the operating system component that gives control of the CPU to the process selected by the short-term scheduler. It performs the actual context switch.

Context Switch Steps

Context Switch

The dispatcher performs four tasks during a context switch:

  1. Save context: Store the current process state in its PCB
  2. Load context: Restore the new process state from its PCB
  3. Switch mode: Transition from kernel mode to user mode
  4. Jump: Set the program counter to resume the user program

Properties

Dispatch Latency

The time to stop one process and start another is pure overhead and should be minimised for high system responsiveness.