427 views

@Deepanshu will you please share the solution!

too much calculation. never going to ask like this in gate.

dont whether calculation. correct or not of mine

general view ------

in case of non premptive we have 4 context switches and as 5 process burst time .....

so 5B + 4 C = 24 hours (24 *60*60 )s

in case of preemptive

context switches of process = B / tq=n

.. where B=burst time , tq = time quantam

so in case of preemptive

4 C ( as 1st time only 4 context switches ) + 5 (n-1)C +5 B = 24 *60*60 + 2* 60 ....

substitute values up above like lasst we get  $C^2$ compute it .

i am not sure about my calc.......so

We use the formula

ns + (n-1)q <= t, where n = number o processes, q = time quantum, s = time of context switch and t = total time until the next context switch

so, calculation ..

5(s) + 4(50) <= (24 x 60 x 60 x 60) + (2 x 60 x 60) ms

=> 5(s) <= 5191000 ms

=> s <= 4.8 hours

1 vote