日期:2014-05-16  浏览次数:20633 次

关于软中断和系统调用的问题
有的书上管系统调用叫软中断有的书上管信号机制叫软中断
到底那一个才叫软中断
另外信号机制和系统调用的关系是怎样的

------解决方案--------------------
系统调用是通过软件中断来实现的
信号似乎也是
------解决方案--------------------
系统调用 和信号机制只是系统中功能罢了,都不叫软中断,

只是可能是用软中断来实现的,软中断是个中断源,

就似定时中断和外部中断。
------解决方案--------------------
其实应该叫软件中断, 真正的软中断是指softirq。注意两者的区别。

在X86体系结构上,系统调用通过软件中断实现系统调用,即陷入内核,然后引起一种特殊的异常-系统调用处理程序异常。
【引自:《Linux Kernel Development》2nd,原文:You are already familiar with one exception: In the previous chapter, you saw how system calls on the x86 architecture are implemented by the issuance of a software interrupt, which traps into the kernel and causes execution of a special system call handler. Interrupts work in a similar way, you shall see, except hardwarenot softwareissues interrupts.



关于信号,可参看:
http://www.cn-doc.com/_system_linux_doc/2005_09_19_21/20050919211014154.htm