edited by
12,470 views
23 votes
23 votes

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?

  1. $5.50$
  2. $5.75$
  3. $6.00$
  4. $6.25$
edited by

3 Answers

Best answer
34 votes
34 votes

$$\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$

edited by
2 votes
2 votes

Ans: Average Turnaround Time is : 5.5

1 votes
1 votes
AFTER GRANT CHART  WE FOUND TAT OF ALL GIVEN PROCESSE   

TAT OF P1=12       ,TAT OF P2=3        TAT OF P3= 6     TAT OF P4=1

SO AVG TAT =TATAL SUM OF TAT /TOTAL NO OF PROCESS

                          22/4=5.5
Answer:

Related questions

40 votes
40 votes
6 answers
1
66 votes
66 votes
9 answers
3
Kathleen asked Sep 18, 2014
23,663 views
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined bythe instruction set architecturepage sizenum...