OA. free
Free
Qualcomm Embedded Systems & Hardware Embedded Systems & Hardware Medium

Which of the scheduling algorithms given below is/are pre-emptive in nature?

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Which of the scheduling algorithms given below is/are pre-emptive in nature?

I) Priority Scheduling
II) Shortest Job First
III) Round Robin
IV) First Come First Serve (FCFS)

Choose one option.
Show answer & explanation
Answer: B. Only (I), (II) and (III)

Pre-emptive scheduling allows the OS to interrupt a running process and switch to another. Priority Scheduling (I) and Shortest Job First (II) can be implemented preemptively by interrupting the current job if a higher-priority or shorter job arrives. Round Robin (III) is inherently pre-emptive as it uses time slices (time quantum) to forcibly switch processes. FCFS (IV) is non-preemptive because once a process starts, it runs to completion without interruption. Therefore, algorithms I, II, and III can be pre-emptive.

Step-by-step Derivation:
Analysis of each algorithm:

  1. Priority Scheduling (I): Can be preemptive. If a higher-priority process arrives while a lower-priority process is running, the lower-priority process can be interrupted (preempted). Can also be non-preemptive if implemented that way.

  2. Shortest Job First (II): Can be preemptive (called Shortest Remaining Time First). When a new job arrives that is shorter than the remaining time of the current job, the current job is preempted.

  3. Round Robin (III): Inherently preemptive. Each process gets a fixed time quantum. After the time quantum expires, the current process is preempted and moved to the back of the queue, and the next process is executed.

  4. FCFS (IV): Non-preemptive by design. Once a process begins execution, it runs to completion. No process can be interrupted, regardless of arrival of new processes.

Conclusion: Algorithms I, II, and III are pre-emptive in nature. Answer is (B) Only (I), (II) and (III).