GATE CSE 2024 Session 2 Q37: Average waiting time under SRTF and non-preemptive SJF
- Operating System
- 2 marks
- MCQ
- −2/3 if wrong
Question
Consider a single processor system with four processes A, B, C, and D, represented as given below, where for each process the first value is its arrival time, and the second value is its CPU burst time.
A (0, 10), B (2, 6), C (4, 3), and D (6, 7).
Which one of the following options gives the average waiting times when preemptive Shortest Remaining Time First (SRTF) and Non-Preemptive Shortest Job First (NP-SJF) CPU scheduling algorithms are applied to the processes?
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: B (official GATE 2024 final answer key)
Concept used: Gantt charts for preemptive and non-preemptive shortest-job scheduling; waiting time = completion − arrival − burst.
First step: SRTF: A runs 0–2, B preempts at 2, C preempts at 4; NP-SJF: A runs 0–10, then pick the shortest of B, C, D.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2024 Session 2 CS question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key
More Operating System PYQs
- 2026 Session 1 · Q29False statements about deadlocks
- 2026 Session 1 · Q35Minimum resource instances for deadlock freedom (5 processes, max 2)
- 2026 Session 1 · Q59Disk transfer time for random sectors on tracks 5, 12, 7
- 2026 Session 1 · Q63Number of printf calls with fork, continue and break
- 2026 Session 1 · Q64Average FCFS waiting time for alternating A and C processes
- 2026 Session 2 · Q23CPU scheduling algorithm that cannot be preemptive