Anonymous user menu

Gate1998_2.17

 Consider n processes sharing the CPU in a round-robin fashion. Assuming that each process switch takes s seconds, what must be the quantum size q such that the overhead resulting from process switching is minimized but at the same time each process is guaranteed to get its turn at the CPU at least every t seconds?

(A)  \(q\le {{t -ns \over n-1 }}\)

(B)  \(q\ge {{t -ns \over n-1 }}\)

(C)   \(q\le {{t -ns \over n +1 }}\)

(D)    \(q\ge {{t -ns \over n+1 }}\)

Answer

Discuss

1Comment
Amit Pal @amitpal101
26 Sep 2016 11:30 am

process switching time (context switchin time ) =t
quantum time = q
every process should get time atleast after t second . in between CPU has to service n-1 process . and for serving n-1 process it need to perform n context switching .
so , (n-1)*q + n *s<= t
so q<= (t-ns)/(n-1)
so ans is (A)