# GATE | GATE-CS-2016 (Set 2) | Question 57

• Last Updated : 22 Jul, 2021

Consider the following processes, with the arrival time and the length of the CPU burst given in milliseconds. The scheduling algorithm used is preemptive shortest remaining-time first.

The average turn around time of these processes is ___________ milliseconds.

(A) 8.25
(B) 10.25
(C) 6.35
(D) 4.25

Explanation: PreEmptive Shortest Remaining time first scheduling, i.e. that processes will be scheduled on the CPU which will be having least remaining burst time( required time at the CPU).

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

The processes are scheduled and executed as given in the below Gantt chart.

Turn Around Time(TAT) = Completion Time(CT) – Arrival Time(AT)

TAT for P1 = 20 – 0 = 20

TAT for P2 = 10 – 3 = 7

TAT for P3 = 8- 7 = 1

TAT for P4 = 13 – 8 = 5

Hence, Average TAT = Total TAT of all the processes / no of processes = ( 20 + 7 + 1 + 5 ) / 4 = 33 / 4 = 8.25

Thus, option (A) is the correct choice.

Watch GeeksforGeeks Video Explanation :

My Personal Notes arrow_drop_up