多核/多CPU机器中的中断如何工作? [英] How do interrupts in multicore/multicpu machines work?

查看:1220
本文介绍了多核/多CPU机器中的中断如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始深入研究底层OS编程.我(非常缓慢)目前正在研究两本较旧的书籍,即XINU和Build Your Own 32 Bit OS,以及上一个问题中的优秀SO人员所建议的一些资源,

I recently started diving into low level OS programming. I am (very slowly) currently working through two older books, XINU and Build Your Own 32 Bit OS, as well as some resources suggested by the fine SO folks in my previous question, How to get started in operating system development.

可能只是我在任何这些资源中都没有遇到过它,但这可能是因为这些资源中的大多数是在无所不在的多核系统之前编写的,但是我想知道的是中断在多核/多处理器系统.

It could just be that I haven't encountered it in any of those resources yet, but its probably because most of these resources were written before ubiquitous multicore systems, but what I'm wondering is how interrupts work in a multicore/multiprocessor system.

例如,假设DMA想要发信号通知文件读取操作已完成.哪个处理器/内核确认发出了中断信号?是启动文件读取的处理器/核心吗?首先是哪个处理器/内核?

For instance, say the DMA wants to signal that a file read operation is complete. Which processor/core acknowledges that an interrupt was signaled? Is it the processor/core that initiated the file read? Is it whichever processor/core that gets to it first?

推荐答案

查看 InterruptService 例程(ISR).
根据此信息,我可以假定该级别较低(请参阅 Adam's post),则可以指定将中断路由到的位置.

Looking into the IoConnectInterrupt function you can find the ProcessorEnableMask that will select the cpu's that allowed to run the InterruptService routine (ISR).
Based on this information i can assume that somewhere in the low level (see Adam's post) it's possible to specify where to route the interrupt.

在旁注中,文件操作与中断和/或DMA并没有真正的关系.文件操作是一种文件系统概念,其转换为低级内容取决于文件系统所处的总线,它可能是IDE或SATA磁盘,甚至可能是usb存储,在这种情况下,扇区读取将通过usb总线转换为3逻辑操作.将由USB主机控制器驱动程序服务,但实际上与原始文件读取操作无关,该中断可能以任何方式拆分为较小的事务.

On the side note file operation is not really related to the interrupts and/or dma directly. File operation is file system concept that translated to something low level depend on which bus you filesystem located it might be IDE or SATA disk or it might be even usb storage in this case sector read will be translated to 3 logical operation over usb bus, there will be interrupt served by usb host controller driver, but it's not really related to original file read operation, that was probably split to smaller transaction any way.

这篇关于多核/多CPU机器中的中断如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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