Open In App

ISRO | ISRO CS 2011 | Question 4

Last Updated : 04 Oct, 2019
Like Article
Like
Save
Share
Report

The following table shows the processes in the ready queue and time required for each process for completing its job.

Process    Time
P1          10
P2          5
P3          20
P4          8
P5          15

If round-robin scheduling with 5 ms is used what is the average waiting time of the processes in the queue?
(A) 27 ms
(B) 26.2 ms
(C) 27.5 ms
(D) 27.2 ms


Answer: (B)

Explanation: The Gantt chart for the processes is shown:

Waiting time of a process = Sum of the periods spent waiting in the ready queue.

 Waiting time = completion time - burst time
Waiting time of P1 = 30 -10 = 20
Waiting time of P2 = 10 - 5 = 5
Waiting time of P3 = 58 - 20 = 38
Waiting time of P4 = 38 - 8 = 30
Waiting time of P5 = 53 - 15 = 38

Average waiting time = 20 + 5 + 38 + 30 + 38
                     =131/5 = 26.2


Quiz of this Question


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads