Skip to content
GATEiit

GATE CSE 2017 Session 2 Q61: Average waiting time under preemptive priority scheduling

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.

ProcessArrival TimeBurst TimePriority
P10112
P25280
P31223
P42101
P59164

The average waiting time (in milliseconds) of all the processes using preemptive priority scheduling algorithm is ________.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
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.

Concept notes

Loading notes…

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

WhatsAppDownload image

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