如果禁用中断,会发生什么,什么你和你不知道如何处理中断怎么办? [英] What happens when you disable interrupts, and what do you do with interrupts you don't know how to handle?

查看:369
本文介绍了如果禁用中断,会发生什么,什么你和你不知道如何处理中断怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在禁止中断(与86的 CLI 指令),到底发生了什么?

When you disable interrupts (with the cli instruction in x86), what exactly happens?


  • 请问PIC等你开启中断,并触发中断当这种情况发生? (如果有的话,多长时间等待,如果时间过期怎么办呢?)

  • Does the PIC wait for you to turn on interrupts, and fire the interrupt when that happens? (If so, how long does it wait, and what happens if the time 'expires'?)

是否中断 - 从设备的角度来看 - 被发送到一个黑洞,没有回应

Does the interrupt -- from the device's perspective -- get sent into a "black hole", with no response?

请问PIC莫名其妙地告诉大家,CPU忙或设备的东西吗?

Does the PIC somehow tell the device that "the CPU is busy" or something?

抑或是别的东西出现?

另外,你如何处理与中断你不知道该如何处理?结果
是否有某种方式来告诉PIC(或设备,如果你不知道该设备是什么),是的,我得到了你的消息,但我不知道该怎么办?

Also, how do you deal with an interrupt you don't know how to handle?
Is there some way to tell the PIC (or the device, if you don't know what the device is), "yes, I got your message, but I don't know what to do with it"?

推荐答案

8259A的PIC等待来自CPU INTA信号。开始由控制转移到相应的ISR处理中断时,CPU发送。这ISR?机长给中断向量到CPU,它看起来了IVT / IDT的地址,你都知道了。直到接收INTA的PIC将不提供中断向量。

The 8259a PIC waits for the INTA signal from the CPU. The CPU sends it when starts handling the interrupt by transferring the control to the appropriate ISR. Which ISR? The PIC gives the interrupt vector to the CPU, which looks up the IVT/IDT for the address and you know the rest. The PIC won't supply the interrupt vector until it receives INTA.

该8259A PIC仅具有I / O设备的单向通信。他们可以告诉它,他们有需要服务的中断。

The 8259a PIC has only one-way communication with I/O devices. They can tell it that they have an interrupt that needs servicing.

所以,一切都在空中了在PIC如果CPU不响应中断。然而,设备可以在它们的随心所欲去断言,然后重新断言的中断请求信号。我不知道这事。我也不知道这对中断服务的时间要求。

So, everything's up in the air in the PIC if the CPU does not respond to interrupts. However, devices may at their whim de-assert and then re-assert interrupt request signals. I don't know which do. I also don't know which have any time requirements for interrupt servicing.

如果你不是从一个特定的源感兴趣的中断,你可以掩盖它,你不会得到任何。如果你把一个中断,但不知道如何处理它,你可以告诉你已经处理它的PIC。这可能使处于冻结状态中断的装置,用于维修发生无限期等待。它也可能导致设备以保持其中断请求信号高,这将是一个问题,如果你正在做的电平触发模式的中断 - 你会不断地得到中断

If you're not interested in interrupts from a specific source, you can just mask it and you won't get any. If you take an interrupt but don't know how to process it, you can just tell the PIC you've handled it. This may leave the interrupted device in a "frozen" state, waiting indefinitely for servicing to happen. It may also cause the device to keep its interrupt request signal high, which will be a problem if you're taking interrupts in level-triggered mode -- you'll be continuously getting interrupts.

这篇关于如果禁用中断,会发生什么,什么你和你不知道如何处理中断怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆