我在这里看到关于例外情况的几个问题,还有一些他们暗示中断作为例外情况,但没有使连接清除。
I've seen several question on here about exceptions, and some of them hint at interrupts as exceptions, but none make the connection clear.
-
什么是中断?
What is an interrupt?
有什么例外? (请说明您所了解的每种语言的例外情况,因为有一些差异)
What is an exception? (please explain what exceptions are for each language you know, as there are some differences)
什么时候中断是异常的?反之亦然? >
When is an exception an interrupt and vice-versa?
-Adam
推荐答案中断是由硬件或特定CPU指令生成的CPU信号。这些导致中断处理程序被执行。诸如来自I / O硬件的I / O信号等事件会产生中断。
An interupt is a CPU signal generated by hardware, or specific CPU instructions. These cause interupt handlers to be executed. Things such as I/O signals from I/O hardware generate interupts.
异常可以被认为是中断的软件版本,仅影响其进程
An exception can be thought of as a software-version of an interupt, that only affects its process.
我不确定具体的细节,但可以通过中断来执行例外 。
I'm not sure on the exact details, but an exception could be implemented by an interupt.
更多推荐
中断和例外
发布评论