摘要
中断是主机与外部设备交互的最重要的方法。中断处理程序(ISR)与其它内核代码的区别是它多了两条限制,一是它不能访问用户空间的数据,二是它应尽可能快。中断处理程序中要注意逻辑并发与物理并发问题。开发ISR大体要分两部分工作,一是采用动态或静态的办法在操作系统中注册此ISR,这是为ISR的运行建立环境;二是编写调试ISR本身对中断的响应过程。分别给出了ISR本身及在多处理器上注册ISR的方法。
Interrupt service routine (ISR) is the most important peripheral accessing method. There are two pieces of main restriction to ISR which are different with other kernel code. First, it can not deliver data to user space directly. Second, it should run as quick as possible. The problems such as, logical concurrency and physical concurrency should be solved properly. Generally, to develop ISR needs two steps, one is to register it into operating system kernel, that is, to prepare the runtime environment for it the other is, to program the interrupt response code itself. AnISR code sample and an ISR registration sample on multiple processor system are given out.
出处
《计算机工程与设计》
CSCD
北大核心
2005年第4期885-886,950,共3页
Computer Engineering and Design
基金
国家"九五"科技攻关基金项目(96-737)