[OS] CPU utilization

楼主: garnettooo (绝代风华贾奈特)   2017-05-17 16:36:01
还想请问大家这题的解析,因为根据题目所提供的情况,
Consider the system running ten tasks and one CPU bound task.Assume that
the I/O bound tasks issue an I/O operation once for every millisecond of
CPU computing and that each I/O operation takes 10 millisecond to complete.
Also assume that the context switching overhead is 0.1 millisecond and
that all processes are long-running tasks. What is the CPU utilization for
RR scheduler when:
(1)time quantum=1 millisecond
(2)time quantum= 10 millisecond
可以了解CPU burst(T)=1, I/O=10,context switch=0.1
(1)第一题没有问题,因为T=Q,所以CPU utilization=T/S+T=1/1+0.1=1/1.1
(2)第二题我就不太了解为何会有20,毕竟Q=10,Q>T,所以应该是T/S+T=1/1+0.1,
为何会是答案所给的20/21.1呢?
作者: nakabin (日落)   2017-05-17 19:33:00
考完就荒废了不太确定,不过如果我没想错应该是像这样吧(我假设每个I/O burst tasks一次都只花1mshttp://i.imgur.com/TSTCYoV.jpg糟糕,本来写T后面不小心写成P了XD总之那个代表I/O的 叉叉是context switch
楼主: garnettooo (绝代风华贾奈特)   2017-05-17 23:03:00
谢谢n大的解答,但想请问一下题目中不是说只有一个cpuBURST跟10个I/O吗?为何n大的解答是一个I/O+10XCPU呢
作者: nakabin (日落)   2017-05-18 03:19:00
蛤 我写的意思是一个cpu burst啊 C的那格就是 跑10ms 后面一个一个小格的是I/O 1~10号
楼主: garnettooo (绝代风华贾奈特)   2017-05-18 14:50:00
原来如此,感谢

Links booklink

Contact Us: admin [ a t ] ucptt.com