in Operating System
757 views
2 votes
2 votes
Consider a CPU running 10 i/o bound task and 1 CPU bound task. Assume that i/o bound task issue an i/o operation once for every millisecond of CPU computing and that each i/o operation takes 10 ms to complete. Also, assume that context switching overhead is 0.1 ms and that all processes are lng running tasks. What is the utilization (in %) for a round-robin scheduler when the time quantum is 10ms.
in Operating System
757 views

2 Answers

4 votes
4 votes
Best answer
There are 10 I/O bound task and 1 CPU bound task. It is given that time quantum is 10ms. As after every 1 ms each I/O bound task goes for performing I/O for the next 10ms, so 10*(1+0.1)=10*1.1=11ms time is spent by the 10 I/O bound task in CPU computation(including context switch time) and the 1 CPU bound task executes for a time quantum of 10ms, so total time spent by the cpu bound task= 10+0.1=10.1ms

hence out of total 11+10.1= 21.1ms, for (10*1)+10= 20ms CPU is utilized and the remaining time is spent in context switches.

Therefore, CPU utilization= (20/21.1)*100= 94.78%
selected by

4 Comments

ok , thanks :)
0
0

in that link, the 2nd question, which is not numbered is similarly

https://gateoverflow.in/118298/gate2017-1-18

Mam, from which university prepare this assignment ?

0
0
0 votes
0 votes
Though time quantum is 10ms, but I/O bound process will only occupy 1ms of cpu and then go to block state as it need I/O, and thus there is 0.1ms of context switching.

So total time taken by I/O bound process will be= 10*1

But CPU bounded process uses its whole 10ms of time slice and 0.1ms of switching. So it takes total time of 1*10=10ms

And total context switching time=11*0.1=1.1ms

Therefor total time taken=10+10+1.1=21.1ms

and time for which cpu was busy/doing execution=10*1+1*10=20

CPU utilisation=(20/21.1)*100=94%