2.2k 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 | 2.2k 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$

edited
0
Where it's written that preemptive SRTF has to be used?
+2
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???
0

How can you preempt process(C) of High Burst time before the process(E) of low burst time in SRTF?

Order Should be ==> (A--B--A--E--C--D) instead of (A--B--A--C--E--D)