Identify the circumstances under which pre-emptive CPU scheduling is used: (a)…

2019

Identify the circumstances under which pre-emptive CPU scheduling is used:

(a)  A process switches from Running state to Ready state

(b)  A process switches from Waiting state to Ready state

(c)  A process completes its execution

(d)  A process switches from Ready to Waiting state

Choose the correct option:

  1. A.

    (a) and (b) only

  2. B.

    (a) and (d) only

  3. C.

    (c)  and (d) only

  4. D.

    (a), (b), (c)  only

Attempted by 599 students.

Show answer & explanation

Correct answer: A

Definition: Preemptive scheduling means the operating system can forcibly interrupt a running process to assign the CPU to another process.

Correct circumstances that can trigger preemptive scheduling:

  • A process switches from Running state to Ready state: This often happens when a running process exhausts its time quantum or the scheduler decides to preempt it; the OS forcibly moves it to Ready so another process can run.

  • A process switches from Waiting state to Ready state: When a blocked process (for example waiting for I/O) becomes ready, the scheduler may preempt the current running process to give the CPU to this newly ready process if the policy (e.g., higher priority) requires it.

Why the other situations are not preemptive triggers:

  • A process completes its execution: This is a voluntary termination; the CPU becomes free and the scheduler selects the next process, but this is not preemption because the running process did not get interrupted involuntarily.

  • A process switches from Ready to Waiting: The process willingly blocks to wait for I/O or an event; it is not a preemptive event because the process itself stopped using the CPU.

Summary: Preemptive scheduling is used when a running process is moved to ready (e.g., time-slice expiry) or when a blocked process becomes ready and may need the CPU immediately (e.g., I/O completion). Therefore, the correct circumstances are a process switching from Running to Ready and a process switching from Waiting to Ready.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor