Scheduling policy behavior: Which scheduling approach permits temporarily suspending a currently runnable process so another process can run (i.e., supports preemption)?
-
Apreemptive scheduling
-
Bnon-preemptive scheduling
-
CFIFO
-
DFCFS
-
ENone of the above
Answer
Correct Answer: preemptive scheduling
Explanation
Introduction / Context:Schedulers arbitrate CPU time among runnable tasks. A key distinction is whether a running task can be involuntarily paused to allow another task to run. This is essential for responsiveness in interactive systems and for meeting deadlines in real-time systems.
Given Data / Assumptions:
- Multiple runnable tasks compete for a single CPU.
- We seek a policy that allows interruption of the current task.
- Alternative policies may require the running task to yield or finish its CPU burst.
Concept / Approach:
Preemptive scheduling allows the OS to interrupt and context-switch from the running task, e.g., at timer interrupts or priority changes. Non-preemptive scheduling (cooperative) waits for the running task to relinquish the CPU. FIFO/FCFS are typically non-preemptive queue disciplines that do not forcibly suspend a running task.
Step-by-Step Solution:
Identify requirement: temporarily suspend runnable process.Map to scheduling types: this is preemption.Recognize that FIFO/FCFS are order policies, usually non-preemptive without time slicing.Thus, preemptive scheduling is correct.Verification / Alternative check:
Classic algorithms like Round Robin and Priority Preemptive are explicitly preemptive, supporting timer-based context switches for fairness and responsiveness.
Why Other Options Are Wrong:
- non-preemptive scheduling: Does not allow involuntary suspension.
- FIFO / FCFS: Typically non-preemptive; once running, a job continues until completion or blocking.
- None of the above: Incorrect because preemptive scheduling fits exactly.
Common Pitfalls:
Assuming FCFS implies preemption; confusing time slicing (preemption) with cooperative yields; ignoring interrupt-driven timer ticks enabling preemption.
Final Answer:
preemptive scheduling