In an Operating System, what is the role of a dispatcher?

In an Operating System, what is the role of a dispatcher?

Answer: A. It gives control of the CPU to the process selected by the scheduler.Concept: In an Operating System, selecting the next process to run and actually handing over the CPU are two separate responsibilities. The short-term (CPU)…

  1. A.

    It gives control of the CPU to the process selected by the scheduler.

  2. B.

    It handles the interruption of processes.

  3. C.

    It determines which process gets the processor next.

  4. D.

    It handles the communication between the operating system and peripheral devices.

Attempted by 278 students.

Show answer & explanation

Correct answer: A

Concept: In an Operating System, selecting the next process to run and actually handing over the CPU are two separate responsibilities. The short-term (CPU) scheduler applies a scheduling policy to pick, from the ready queue, which process should run next. The dispatcher is the module that then carries out that decision: it performs the context switch, switches the CPU to user mode, and jumps to the correct location in the chosen process's program, so the process actually starts executing.

Application: Applying this to the question, the dispatcher's defining action is giving control of the CPU to whichever process the scheduler has already selected. Among the four statements, only "It gives control of the CPU to the process selected by the scheduler" describes this mechanism-level hand-off, so that is the dispatcher's role.

Cross-check: Each of the other statements belongs to a different OS component, not the dispatcher:

  • "It determines which process gets the processor next" is a policy decision — that is the short-term scheduler's job, a separate step that happens before the dispatcher acts.

  • "It handles the interruption of processes" describes interrupt/trap handling — the routine invoked when a hardware or software interrupt occurs.

  • "It handles the communication between the operating system and peripheral devices" describes device drivers and the I/O subsystem, which manage data transfer with hardware.

Result: The dispatcher gives control of the CPU to the process the scheduler selected — the time this hand-off takes is called dispatch latency.

Explore the full course: Operating System

Loading lesson…