"time overrun" 和 "time limit exceeded" 有什么区别?

What is the difference between "time overrun" and "time limit exceeded"?

我的 class 和我无法就 "Time Limit Exceeded" 和 "Time Overrun" 之间是否存在差异达成共识。我们正在阅读 Stallings 的“Operating Systems”,除了下面的描述之外,没有发现这两者有任何区别。

您可以在 this PDF.

第二页查看“进程终止原因”列表

来自该列表:

+---------------------+-------------------------------------------------------------------------------------------------------+
| Reason              | Explanation                                                                                           |
+---------------------+-------------------------------------------------------------------------------------------------------+
| Time limit exceeded | The process has run longer than the specified total time limit.                                       |
|                     | There are a number of possibilities for the type of time that is measured.                            |
|                     | These include total elapsed time ("wall clock time"), amount of time spent executing,                 |
|                     | and, in the case of an interactive process, the amount of time since the user last provided any input.|
+-----------------------------------------------------------------------------------------------------------------------------+
| Time overrun        | The process has waited longer than a specified maximum for a certain event to occur.                  |
+---------------------+-------------------------------------------------------------------------------------------------------+

到目前为止,我看到的最好的回答是 "time limit exceeded" 是允许进程使用 CPU(OS 控件)和 "time overrun" 是进程等待事件发生的时间过长(进程内的控制)。

是否有区别,如果有,哪个组件决定终止 - 内核还是进程?仅仅是一个"run"长于允许,一个"waited"长于允许?

“超时运行”就是通常所说的超时。你是对的,可能导致超时的等待是在进程的控制之下。

您的书显然描述的是非常古老的系统;在现代的系统中,超时很少(如果有的话)被认为是终止进程的原因(当然,任何进程都可能 选择 在发生时退出)。另一方面,对进程总 运行 时间的限制是一个常见的(如果可选)功能:Unix 系统将 SIGXCPU 发送到 CPU 时间超过 configurable limit.