322 views
1 votes
1 votes

Consider 3 processes P0P1 and P2 to be scheduled as per the SRTF algorithm. The process ‘P0’ is known to be scheduled first and when ‘P0 has been running ‘6’ units of time, then the process ‘P2’ has arrived. The process ‘P2’ has run for ‘4’ unit of time,then the process ‘P1’ has arrived and completed running in ‘5’ units of time. Then the minimum burst time of ‘P0’ is _______ (in units).

1 Answer

0 votes
0 votes
Let the initial burst time of $P_0=x,P_2=y.$

After completing $6$ unit of time $P_0$ burst time $=x-6$

Process $P_2$ arrived and prempt process $P_0$ which illustrates that at this point of time remaining burst time of $P_0(x-6) >y. -(i) $

After completing $4$ unit of time $P_1$ arrived and preempts i.e same logic  $y-4>5-(ii)$

Using $(ii):$
$\Rightarrow$  $y-4>5$

$\Rightarrow$  $y-4\geq6$

Minimum  is asked so ,
$\Rightarrow$  $y=10$

Using eqn $(i):$

$\Rightarrow$  $(x-6)>10$

$\Rightarrow$  $(x-6)\geq11$

$\Rightarrow$  $\color{darkblue}{x=17}$

Related questions

0 votes
0 votes
0 answers
2
eyeamgj asked Aug 14, 2018
239 views
0 votes
0 votes
2 answers
3
rahul sharma 5 asked Dec 6, 2016
386 views
0 votes
0 votes
2 answers
4
Deepalitrapti asked Jun 10, 2019
434 views