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:
- Save context: Store the current process state in its PCB
- Load context: Restore the new process state from its PCB
- Switch mode: Transition from kernel mode to user mode
- 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.