488 views
0 votes
0 votes

Consider $m$ processes sharing the CPU in a round-robin manner. Assume that each process switch takes $p$ seconds. For which value of quantum size $w$, the overhead resulting from process switch is minimized but at the same time each process is guaranteed to get it's turn of the CPU at least every $n$ seconds?

  1. $w \leq \frac{n- mp}{m-1}$
  2. $w \geq \frac{n- mp}{m-1}$
  3. $w \leq \frac{n- mp}{m+1}$
  4. $w \leq \frac{n- mp}{m+1}$

3 Answers

3 votes
3 votes
Answer is - A)  $w\leq \frac{n- mp}{m-1}$
3 votes
3 votes
here P1|P2|P3|......Pm processes are running each taking time quantum= w units and process switch is p seconds so we have to find when one process will get its time again so suppose there are 4 processes P1,P2,P3,P4

P1|P2|P3|P4|P1 to get when p1 will again get its chance let it n seconds

there are 4 switches happen and between first time execution and second time execution of P1 three processes spend quantum time

so in this case 4p+3w<=n

and now generalise it, it will be

mp+(m-1)w<=n

so $w<= \frac{n-mp}{m-1}$
Answer:

Related questions

2 votes
2 votes
1 answer
1
Bikram asked Sep 3, 2016
293 views
Match these OS abstractions with Hardware components:A. Thread1. interruptB. Virtual address space2. memoryC. File system3. CPUD. Signal4. DiskA-2 B-4 C-3 D-1A-1 B-2 C-3 ...
3 votes
3 votes
1 answer
2
Bikram asked Sep 3, 2016
355 views
Semaphores are used to solve the problem ofresource allocationprocess synchronizationdeadlockprocess communication
3 votes
3 votes
1 answer
3
2 votes
2 votes
2 answers
4