GATE CSE 2017 Session 2 Q61: Average waiting time under preemptive priority scheduling
- Operating System
- 2 marks
- NAT
- No negative marking
Syllabus topic: CPU and I/O scheduling
Question
Consider the set of processes with arrival time (in milliseconds), CPU burst time (in milliseconds), and priority (0 is the highest priority) shown below. None of the processes have I/O burst time.
| Process | Arrival Time | Burst Time | Priority |
|---|---|---|---|
| 0 | 11 | 2 | |
| 5 | 28 | 0 | |
| 12 | 2 | 3 | |
| 2 | 10 | 1 | |
| 9 | 16 | 4 |
The average waiting time (in milliseconds) of all the processes using preemptive priority scheduling algorithm is ________.
Try it: numerical answer: type the value
Show answer and explanation
Answer: 29 (official GATE 2017 final answer key)
Concept used: In preemptive priority scheduling the running process is preempted whenever a higher-priority process arrives; waiting time = completion time − arrival time − burst time.
First step: Draw the Gantt chart starting at time 0, checking for preemption at each arrival (times 2, 5, 9, 12).
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 2 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