- 论坛徽章:
- 22
|
本帖最后由 amarant 于 2011-03-29 08:25 编辑
The expression static priority / 4 - 28 is called the interactive delta ; some typical values of this term are listed inTable 7-2. It should be noted that it is far easier for high priority than for low priority processes to become interactive. For instance, a process having highest static priority (100) is considered interactive when its bonus value exceeds 2, that is, when its average sleep time exceeds 200 ms. Conversely, a process having lowest static priority (139) is never considered as interactive, because the bonus value is always smaller than the value 11 required to reach an interactive delta equal to 6. A process having default static priority (120) becomes interactive as soon as its average sleep time exceeds 700 ms.
這段仔細看看,interactive delt用來判斷是否是交互式進程
The average sleep time is also used by the scheduler to determine whether a given process should be considered interactive or batch. More precisely, a process is considered "interactive" if it satisfies the following formula:
dynamic priority <= 3 x static priority / 4 + 28 (3)
which is equivalent to the following:
bonus - 5 >= static priority / 4 - 28
Sleep time threshold,睡眠時間極限值
The sleep time threshold depends on the static priority of the process; some typical values are shown in Table 7-2. In short, the goal of this empirical rule is to ensure that processes that have been asleep for a long time in uninterruptible modeusually waiting for disk I/O operationsget a predefined sleep average value that is large enough to allow them to be quickly serviced, but it is also not so large to cause starvation for other processes.
BTW:這個問題到內核源碼板塊問更好,版主flw2對這個算法非常熟悉 |
|