in Operating System edited by
12,493 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$
in Operating System edited by
12.5k views

1 comment

Here after the process p2 why p3 is not scheduled....and why p4 got scheduled
0
0

3 Answers

34 votes
34 votes
Best answer

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

4 Comments

can someone just edit and put all TATs in bracket i.e (12+3+6+1)/4 .Thankyou👍
1
1

@Lakshman Patel RJIT please look into what @PSDesai09 has mentioned.

1
1
Fixed now 👍
0
0
2 votes
2 votes

Ans: Average Turnaround Time is : 5.5

1 comment

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
0
0
1 vote
1 vote
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