Anonymous user menu

Consider the following set of processes that need to be scheduled

Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds

Process Name Arrival Time Execution Time
A 0 6
B 3 2
C 5 4
D 7 6
E 10 3

Using the shortest remaining time first scheduling algorithm, the average process turnaround time (in msec) is ____________________.

Answer

Using the SRTF(Shortest Remaining Time First) algorithm , the Gantt chart representing the scheduled processes would look something like the following:

Now turnaround time is defined as the difference between the times when the process is submitted first for execution and when the execution of the process finishes.
Hence , here the turnaround time for the processes will be as follows:

A -> (8-0) = 8
B -> (5-3) = 2
C -> (12-5) = 5
D -> (21-7) = 14
E -> (15-10) = 5

Hence the average turnaround time =(8+2+5+14+5)/5 = 36/5 = 7.2

ANSWER : 7.2

0Comment