Skip to content
GATEiit

GATE CSE 2017 Session 1 Q34: SRTF scheduling: average waiting time for four processes

Syllabus topic: CPU and I/O scheduling

Question

Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below :

ProcessArrival timeBurst time
P107
P233
P355
P462

If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is ________ milliseconds.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 3 (official GATE 2017 final answer key)

Concept used: In SRTF, at every arrival the process with the least remaining burst runs; waiting time = completion − arrival − burst.

Concept notes

Loading notes…

First step: Draw the Gantt chart, re-deciding at each arrival (t = 3, 5, 6) by comparing remaining times.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on CPU and I/O scheduling

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2017 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key