gpt4 book ai didi

linux - Windows有中断上下文吗?

转载 作者:太空宇宙 更新时间:2023-11-04 04:21:52 26 4
gpt4 key购买 nike

我最近开始阅读 Robert Love 的《Linux 内核开发》,并且我喜欢它!请阅读以下书中的摘录,以更好地理解我的问题:

A number identifies interrupts and the kernel uses this number to execute a specific interrupt handler to process and respond to the interrupt. For example, as you type, the keyboard controller issues an interrupt to let the system know that there is new data in the keyboard buffer. The kernel notes the interrupt number of the incoming interrupt and executes the correct interrupt handler.The interrupt handler processes the keyboard data and lets the keyboard controller know it is ready for more data...

现在我的机器上有双启动,有时(事实上,很多)当我在 Windows 上输入内容时,我发现自己处于我所说的“夜间爬虫”模式。这是当我打字时,我在屏幕上看不到任何内容,过了一会儿,整个文本突然出现,可能缓冲区只是将所有内容吐出来。

现在我在 Linux 上没有看到这种情况发生。是因为Linux中存在中断上下文而Windows中没有它吗?

顺便说一句,我仍然不确定 Windows 中是否存在中断上下文,谷歌没有给我任何相关结果。

最佳答案

所有操作系统都有一个中断上下文,它是 CPU 架构的一个功能/约束——基本上,这就是计算机硬件的“工作方式”。不过,不同的操作系统(以及该操作系统中的驱动程序)对于返回之前在中断中执行哪些工作以及执行多少工作做出了不同的选择。这可能与您的 Windows 体验有关,也可能无关。将按键转换为屏幕输出涉及很多代码,而中断处理只是一小部分。

关于linux - Windows有中断上下文吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12374883/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com