Just4U 不会算圈图的程序猿不是个好厨子

2020-11-20

# 1. unix 系统中的进程调度

类推，如果是两个具有普通优先级的进程，他们同样会每个获得50\% 处理器时间，但是是在100ms内各获得一半。


Now, what happens if we run exactly two low priority processes? We’d
expect they each receive 50\% of the processor, which they do. But they each enjoy the
processor for only 5 milliseconds at a time (5 out of 10 milliseconds each)! That is, instead
of context switching twice every 105 milliseconds, we now context switch twice every
10 milliseconds.
Conversely, if we have two normal priority processes, each again receives
the correct 50\% of the processor, but in 100 millisecond increments.