GATE | GATE-CS-2015 (Set 3) | Question 65

For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?

Process    Arrival Time    Processing Time
  A              0              3
  B              1              6
  C              4              4
  D              6              2

(A) First Come First Serve
(B) Non-preemptive Shortest Job First
(C) Shortest Remaining Time
(D) Round Robin with Quantum value two


Answer: (C)

Explanation: Turnaround time is the total time taken between the submission of a program/process/thread/task (Linux) for execution and the return of the complete output to the customer/user.

Turnaround Time = Completion Time – Arrival Time.



FCFS = First Come First Serve (A, B, C, D)
SJF = Non-preemptive Shortest Job First (A, B, D, C)
SRT = Shortest Remaining Time (A(3), B(1), C(4), D(2), B(5))
RR = Round Robin with Quantum value 2 (A(2), B(2), A(1),C(2),B(2),D(2),C(2),B(2)

 

Pr  Arr.Time  P.Time   FCFS     SJF      SRT    RR
A      0       3      3-0=3    3-0=3    3-0=3   5-0=5
B      1       6      9-1=8    9-1=8    15-1=14 15-1=14         
C      4       4      13-4=9   15-4=11  8-4=4   13-4=9 
D      6       2      15-6=9   11-6=5   10-6=4  11-6=5 

Average                7.25     6.75     6.25    8.25

Shortest Remaining Time produces minimum average turn-around time.

 

Quiz of this Question

My Personal Notes arrow_drop_up