中断和例外

编程入门 行业动态 更新时间:2024-10-17 05:37:25
本文介绍了中断和例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在这里看到关于例外情况的几个问题,还有一些他们暗示中断作为例外情况,但没有使连接清除。

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.

更多推荐

中断和例外

本文发布于:2023-11-07 10:45:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566240.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!