Consider the following set of processes, with the arrival times and the CPU-burst times gives in milliseconds.$$\small \begin{array}{|c|c|c|} \hline \textbf{Process} & \textbf{Arrival Time} & \textbf{Burst Time}\\\hline \text{P1} & 0 & 5\\ \text{P2} & 1 & 3\\ \text{P3} & 2 & 3 \\ \text{P4} & 4 & 1\\\hline \end{array}$$What is the average turnaround time for these processes with the preemptive shortest remaining processing time first (SRPT) algorithm?
$$\small\begin{array}{|c|c|c|} \hline \textbf{Process} & \textbf{Waiting Time = } & \textbf{Turnaround Time =} \\ & \textbf{(Turnaround Time - Burst time)} & \textbf{(Completion Time - Arrival Time )}\\\hline \text{P1} & 7 & 12 \\\hline \text{P3} & 0 & 3\\\hline \text{P2} & 3 & 6 \\\hline \text{P4} & 0 & 1\\\hline \end{array}$$ Average turnaround time $=\frac{12+3+6+1}{4}=\frac{22}{4}=5.5$
Correct Answer: $A$
@Lakshman Patel RJIT please look into what @PSDesai09 has mentioned.
Ans: Average Turnaround Time is : 5.5
64.3k questions
77.9k answers
244k comments
80.0k users