Difficulty: Medium
Correct Answer: actually schedules the tasks into the processor
Explanation:
Introduction / Context:
Scheduling is a two-part process: a scheduler chooses which runnable task should execute next based on policy, and a dispatcher performs the low-level context switch to start that task on the CPU. Understanding this distinction is important for OS design and troubleshooting latency.
Given Data / Assumptions:
Concept / Approach:
While the high-level decision (“which task next?”) is the scheduler’s responsibility, the dispatcher handles the actual context switch: saving the current context, loading the chosen task’s context, updating CPU registers, and transferring control. In many texts, this concrete act is described as “dispatching” the process to the processor, i.e., actually getting it onto the CPU.
Step-by-Step Reasoning:
Verification / Alternative check:
OS textbooks and kernel code separate pick-next-task (scheduler) and context_switch (dispatcher). Traces show the dispatcher enabling the selected task to run on the CPU.
Why Other Options Are Wrong:
Common Pitfalls:
Conflating the scheduler’s decision-making with the dispatcher’s context-switching; assuming the dispatcher manages priorities or I/O states.
Final Answer:
actually schedules the tasks into the processor
Discussion & Comments