operating-system-dispatcher.html
* created: 2025-05-18T16:56
* modified: 2025-06-30T21:36
title
Dispatcher
description
The dispatcher is the OS module responsible for context switching, moving the CPU from one process to another.
related notes
Dispatching a process
A dispatcher is responsible for revoking access to the CPU for the currently running process and granting access to the CPU to the upcoming process. This happens during a context switch.
For this to successfully happen a couple of steps need to be taken; the following is a attempt to showcase these:
- Saving the context of the currently running process.
- Select the next process using the scheduler.
- Loading the context of the upcoming process.
- Switching the CPU into user and kernel mode.
- Update the process control block.
- Transfer control to the next process.
- (Maybe) handle any occurring interrupts during the switch.