GATE - 2017 | OS | Consider the following CPU processes with arrival times

GATE - 2017 | OS | Consider the following CPU processes with arrival times
Posted on 08-02-2022

GATE - 2017 [Operating System]

Question:

Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below:

Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below:

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.

A

3

B

4

C

5

D

6

 

Solution 1:

Option (A) is Correct

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.

 

---------------------------------------------------------------

Solution 2:

GATE 2017 OS

Turn Around Time

P1  = 12-0 = 12P2 = 6-3 = 3P3 = 17-5 = 12P4 = 8 - 6 = 2

Waiting Time

P1  = 12-7 = 5P2 = 3-3 = 0P3 = 12-5 = 7P4 = 2 - 2 = 0

Average Waiting time = (7+0+5+0)/4 = 3.0

 

 

Thank You

Download App for Free PDF Download

GovtVacancy.Net Android App: Download

government vacancy govt job sarkari naukri android application google play store https://play.google.com/store/apps/details?id=xyz.appmaker.juptmh