大家好 想请问洪逸在今年的os讲cpu 利用率问题的时候补充了一个探讨 有点忘记上课怎么讲的了 所以上来发问 原问题如下
[CPU Scheduling] Consider a system running ten I/O-bound 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 milliseconds to complete. Also assume that the context switching overhead is 0.1 milliseconds and that all processes are long-running tasks. What is the CPU utilization for a Round-robin scheduler when:
(a) The time quantum is 1 millisecond (5%)
(b) The time quantum is 10 milliseconds (5%)
探讨是说 cpu total time其实是process 执行时间+context switch time 要再加上cpu idle time
问说如果此题改为11个I/O bound task 没有cpu bound task
若每个I/O operation改为12ms , 则会有cpu idle time 1ms 想问这个1ms是怎么来的
如果是照他画的图那样第一个process执行完之后开始I/O operation 数12秒 那这样idle time为什么不是12-11-0.1
还有洪逸的算式是写 (11*1)/12+1.1
不太懂分母为什么写12+1.1
我自己理解是 11*1.1+idle time 1ms
虽然算出来一样但不知道意思一不一样
以上 烦请大大们解惑 感激不尽