Skip to content
GATEiit

GATE CSE 2024 Session 2 Q37: Average waiting time under SRTF and non-preemptive SJF

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

Select one option
Wrong answer costs 2/3 mark in GATE.
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

WhatsAppDownload image

Source: official GATE 2024 Session 2 CS question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key