1,986 views
2 2 votes
Consider 3 process P0, P1, P2 to be scheduled as per SRTF algorithm. The process P0 is known to be scheduled first and when P0 is running 5 units of time the process P2 arrived. The process P2 has own 2 units of time, the process P1 ha arrived and completed running in 4 units of time. Then the minimum burst time of P0 is

2 Answers

6 6 votes
Suppose Po burst time is x unit, P0 run for 5 units of time before getting preempted by P2, therefore remaining time = x-5 unit
P2 burst time is y unit, P2 runs for 2 units of time before getting preempted by P1, therefore remaining time = y-2
P1 run for 4 unit fo time.
Since P1 preempt P2, and SRTF is used so minimum value of P2 must be 5 unit at that time, so y-2 = 5 i.e y = 7
Similarly x-5 = 8, and x = 13 unit.
So minimum burst time of P0 is 13 unit
1 1 vote
Ans=13 Since P1 has preempted the process P2 at the time of arrival. So the remaining burst time of P2 should be equal to 4+1=5. Now P2 has already executed for 2 units before getting preempted. So at the time of arrival , the total burst cycle of P2 would be 5+2=7. And again P2 has preempted P0 at the time of arrival, so P1 must have atleast 8 burst cylce at that time. So the min burst time of P0 is 8+5(because it has consumed its 5 bursts)=13
Position:
Show:

Related questions

2 2 votes
2 2 answers
382
382 views
GO Classes asked Aug 3
382 views
Four processes arrive at time $0$ in the following order:$P_1,\ P_2,\ P_3,\ P_4$Their CPU burst times are:$P_1=8$$P_2=4$$P_3=2$$P_4=1$Calculate the difference between the...
0 0 votes
0 0 answers
289
289 views
tarunmundriya asked Dec 27, 2025
289 views
Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisecond of CPU computing a...
0 0 votes
1 1 answer
696
696 views
arpit.jha asked Apr 26, 2024
696 views
Hi, All I have a question that in Process Scheduling topic most of the time we need to solve the problem using Gantt chart that's a bit time consuming . So I wanted to kn...
0 0 votes
3 3 answers
1.1k
1.1k views
Chaitanya Kale asked Sep 22, 2022
1,083 views
If we are using non-preemptive CPU scheduling then can there be process state transition from running to ready state?