in Operating System edited by
656 views
0 votes
0 votes

in Operating System edited by
656 views

8 Comments

86.80?
0
0
1.2 * $10 ^8$ ???
0
0

 how 86.8 ??

my view 200 ms in nonprememptive .... so in prememptive 200ms with 2 minutes also and convert all this to micro seconds

0
0
brother i think u are mising something... lets see ! but i think it should be 86.8
0
0
hmm my mistake i didnt convert properly ... getting something  69.4 something like that
0
0
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