GATE - 2007 | OS | An operating system uses Shortest Remaining Time First (SRT)

GATE - 2007 | OS | An operating system uses Shortest Remaining Time First (SRT)
Posted on 16-02-2022

GATE - 2007 [Operating System]

Question:

An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes:

Process  Execution time  Arrival time

P1             20            0

P2             25            15

P3             10            30

P4             15            45

What is the total waiting time for process P2?

A

5

B

15

C

40

D

55

   

Solution:

Option (B) is Correct.

An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes:

Waiting time for process P2 = TAT - Execution time
= Completion time - AT - ET
= 55 - 15 - 25
= 15

Thank You