GATE CSE 2017 Session 1 Q34: SRTF scheduling: average waiting time for four processes
- Operating System
- 1 mark
- NAT
- No negative marking
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 :
| Process | Arrival time | Burst time |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 3 | 3 |
| P3 | 5 | 5 |
| P4 | 6 | 2 |
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
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.
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
Source: official GATE 2017 Session 1 CS question paper and final answer key, organised by IIT Roorkee. 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