in Operating System edited by
427 views
0 votes
0 votes

in Operating System edited by
427 views

4 Comments

is the answer 6.94 microsecond
0
0

@Deepanshu will you please share the solution!

0
0

 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 

 

 

1
1

1 Answer

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

Related questions