GATE - 2006 | OS | Consider three processes (process id 0, 1, 2 respectively) with

GATE - 2006 | OS | Consider three processes (process id 0, 1, 2 respectively) with
Posted on 18-02-2022

GATE - 2006 [Operating System]

Question:

Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turnaround time is:  

A

13 units

B

14 units

C

15 units

D

16 units

Solution:

Option (A) is Correct.

Algorithm: LRTF (Longest Remaining Time First)

Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turnaround time is:

Avg TAT = 12+13+14/3 = 39/3 = 13 units

Thank You