Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

关于中断重入的冲突问题

10 views
Skip to first unread message

长井

unread,
Aug 26, 2013, 6:48:21 AM8/26/13
to osfrom...@googlegroups.com
hi
orange的处理是中断重入了,就直接退回上个中断继续运行,我有个疑问 ,键盘中断发生,如果这个时候时钟中断或者其他中断发生,会不会影响键盘数据的输入,如果我是打印呢,操作系统是怎么处理这个冲突的


simpleboy~

unread,
Aug 26, 2013, 9:46:20 AM8/26/13
to osfrom...@googlegroups.com

首先CPU处理 硬件 中断的方式分为可屏蔽中断(它中断了,其他就不能再中断)和不可屏蔽中断。可屏蔽式中断CPU检测方式是CPU引脚INTR 处理方式是清标志寄存器eflags的IF标志可屏蔽中断。二不可屏蔽中断CPU检测方式是CPU引脚NMI,不清IF标志。(引起NMI的有例如 除0,溢出,越界etc)
所有的发生在 8259A 芯片上的中断都是都是INTR引脚的,即可屏蔽中断。如时钟,键盘,硬盘等。
而且即使很多在临界区资源操作中的代码许多地方也用cli()与sti()实现了可屏蔽中断的效果。



在 2013-08-26 18:48:21,"长井" <060...@163.com> 写道:
hi
orange的处理是中断重入了,就直接退回上个中断继续运行,我有个疑问 ,键盘中断发生,如果这个时候时钟中断或者其他中断发生,会不会影响键盘数据的输入,如果我是打印呢,操作系统是怎么处理这个冲突的


--
--
You received this message because you are subscribed to the Google
Groups "自己动手写操作系统" group.
To post to this group, send email to osfrom...@googlegroups.com
To unsubscribe from this group, send email to
osfromscratch+unsub...@googlegroups.com
For more options, visit this group at
https://groups.google.com/group/osfromscratch?hl=en
 
---
You received this message because you are subscribed to the Google Groups "自己动手写操作系统" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osfromscratch+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply all
Reply to author
Forward
0 new messages