1.7k views

Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.
$$\small \begin{array}{|c|c|c|} \hline \textbf{Process Name} & \textbf{Arrival Time} & \textbf{Execution Time} \\\hline \text{A} & 0 & 6 \\ \text{B} & 3 & 2 \\ \text{C} & 5 & 4 \\ \text{D} & 7 & 6 \\ \text{E} & 10 & 3 \\\hline \end{array}$$Using the shortest remaining time first scheduling algorithm, the average process turnaround time (in msec) is ____________________.

edited | 1.7k views

$\text{Average Turnaround Time} =\dfrac{(8-0)+(5-3)+(12-5)+(21-7)+(15-10)}{5}$

$\qquad \qquad \qquad \qquad = \dfrac{36}{5} = 7.2$

So, answer is $7.2\;ms$

by Active (1k points)
edited
0
Where it's written that preemptive SRTF has to be used?
+1
SRTF means pre-emptive only , as it is shortest "Remaining" time first. The non pre-emptive version is called SJF(Shortest Job First)
0
SRTF is always preempted ???

whethe they write or not???