GATE | GATE CS 2019 | Question 50
Consider the following four processes with arrival times (in milliseconds) and their length of CPU burst (in milliseconds) as shown below:

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 __________.
Note: This was Numerical Type question.
(A) 2
(B) 3
(C) 1
(D) 4
Answer: (A)
Explanation: Using shortest remaining time (SRTF) first CPU scheduling algorithm,
Let Z = 1, then gantt chart will be,

Average waiting time,
= {(4-0-3) + (2-1-1) + (8-3-3) + (5-4-1)} / 4
= (1 + 0 + 2 + 0) / 4
= 3 / 4
= 0.75
Now, let Z = 2, then gantt chart will be,

Average waiting time,
= {(4-0-3) + (2-1-1) + (9-3-3) + (6-4-2)} / 4
= (1 + 0 + 3 + 0) / 4
= 4 / 4
= 1
So, answer is 2.
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 2019 | Question 65
- GATE | GATE CS 2019 | Question 64
- GATE | GATE CS 2019 | Question 63
- GATE | GATE CS 2019 | Question 61
- GATE | GATE CS 2019 | Question 60
- GATE | GATE CS 2019 | Question 52
- GATE | GATE CS 2019 | Question 51
- GATE | GATE CS 2019 | Question 49
- GATE | GATE CS 2019 | Question 48
- GATE | GATE CS 2019 | Question 47
- GATE | GATE CS 2019 | Question 46
- GATE | GATE CS 2019 | Question 53
- GATE | GATE CS 2019 | Question 54
- GATE | GATE CS 2019 | Question 59
- GATE | GATE CS 2019 | Question 58



