Preemptive CPU scheduling Which of the following is an example of a preemptive scheduling algorithm used by operating systems?

Difficulty: Easy

Correct Answer: Round-robin

Explanation:


Introduction / Context:
Preemptive CPU scheduling allows the operating system to interrupt a running process and assign the CPU to another process, improving responsiveness and fairness. This question asks you to identify a classic preemptive algorithm from common scheduling strategies.



Given Data / Assumptions:

  • The options list well known algorithms: round-robin, shortest-job-next, and priority-based.
  • “Preemptive” means a running task can be paused by the scheduler before it voluntarily yields.
  • We assume standard textbook definitions (shortest-job-next is non-preemptive; shortest-remaining-time is the preemptive variant).


Concept / Approach:

Round-robin scheduling assigns a fixed time quantum to each ready process in a cyclic order. When the quantum expires, the scheduler preempts the process and dispatches the next one. This is the quintessential example of preemption designed for time-sharing systems.



Step-by-Step Solution:

Identify which listed algorithms are inherently preemptive.Round-robin uses a time quantum and forced preemption at the quantum boundary.Shortest-job-next (also called shortest-job-first) is typically non-preemptive; its preemptive cousin is shortest-remaining-time-first.Priority-based scheduling can be either preemptive or non-preemptive depending on implementation, so it is not guaranteed preemptive.Therefore, select Round-robin.


Verification / Alternative check:

Any system configured with a time slice (quantum) and context switching on timer interrupts implements preemption; this matches round-robin behavior.



Why Other Options Are Wrong:

b: Shortest-job-next is the non-preemptive form; it waits for the running job to finish. c: Priority-based may be preemptive or non-preemptive; the option as stated is ambiguous. d: Not all listed algorithms are preemptive. e: Incorrect because round-robin is preemptive.



Common Pitfalls:

Confusing shortest-job-next with shortest-remaining-time-first; assuming all priority schedulers preempt lower priorities—this depends on design.



Final Answer:

Round-robin

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion