GATE CSE 2019 Q51: Unknown burst time from average waiting time under SRTF
- Operating System
- 2 marks
- NAT
- No negative marking
Syllabus topic: CPU and I/O scheduling
Question
Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:
| Process | P1 | P2 | P3 | P4 |
|---|---|---|---|---|
| Arrival time | 0 | 1 | 3 | 4 |
| CPU burst time | 3 | 1 | 3 | Z |
These processes are run on a single processor using preemptive Shortest Remaining Time First scheduling algorithm. If the average waiting time of the processes is 1 millisecond, then the value of Z is ________.
Try it: numerical answer: type the value
Show answer and explanation
Answer: 2 (official GATE 2019 final answer key)
Concept used: Under preemptive SRTF the process with the least remaining time always runs; waiting time = completion time − arrival time − burst time, and the total waiting time here must be ms.
First step: Draw the Gantt chart up to time 4 (P1, P2, P1 are fixed), note the waiting time already built up, then try small values of Z for P4 against P3's remaining 3 ms until the total waiting time is 4 ms.
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 2019 CS question paper and final answer key, organised by IIT Madras. 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