linux 信号 软中断,linux信号与软中断(Linux signal and soft interrupt).doc

linux信号与软中断(Linux signal and soft interrupt).doc

linux信号与软中断(Linux signal and soft interrupt)Soft interrupt

Soft interrupt is generally referred to as a pseudo interrupt action caused by instruction int - an artifact that interrupts CPU, while a hard interrupt is a real interrupt triggered by a 8259 line. Therefore, strictly speaking, int and IRQ have nothing to do with each other, but the two are related to the interrupt vector. Int induced disruption of CPU, is the interrupt vector number from the instruction in IRQ; the break caused by CPU from the data line must retrieve the interrupt number (hardware interrupt triggered first to 8259 A IRQ pin 8259, according to the defined rules conversion interrupt vector number, the corresponding place in the data line then notify the CPU interrupt arrival). Next, CPU works just the same: protecting the scene, breaking the program address, executing interrupt processing, restoring the field, and continuing to execute the interrupted instructions. The Windows driver can not take over the interrupt directly. The interrupt is taken over by the VPICD of the kernel. The driver just registers the interrupt service to the VPICD, and the interrupt service will be called by VPICD. This can effectively implement virtual devices: virtual devices that do not exist or change the behavior of existing physical devices.

Linux uses int $80 to implement system call exceptions. This instruction transfers the control to the kernel by using interrupt / exception vector number 128 (i.e., 80 of 16). In order to achieve the system call without using machine instruction programming, in the standard C language library for each system call provides a short subroutine, complete the machine code programming. In fact, the machine code section is very short. All it has to do is load the parameters that call the system into the CPU register, and then execute the int $0x80 instructions. Then, the system call is invoked, and the return value of the system call is sent to a register in CPU. The standard li

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值