difference between software interrupt and signal

社会主义新天地 提交于 2019-12-05 02:47:15

问题


"Software interrupts are delivered using signals"

Is this always true, if not then

a) what is the difference between two

If yes, is there some other mechanism, by which software interrupts are raised, other than delivering signals.


回答1:


The author of that quote appears to be using "Software interrupt" in a very general sense (i.e. "anything that causes a program to diverge from it's usual flow of operation and does not originate in hardware") and "signals" in the sense of a particular mechanism used by a particular operating system (probably unix derived).




回答2:


Yes its always true that software interrupts are delivered using signals to the operating system. In fact even hardware interrupts are themselves delivered using signals to operating system.

Signal is an IPC(inter process communication) mechanism that is used by 'interrupt mechanism' to notify that something has occurred.



来源:https://stackoverflow.com/questions/3993479/difference-between-software-interrupt-and-signal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!