How does a process executing in kernel space come to know of occurrence of unexpected (asynchronous) events?

拟墨画扇 提交于 2019-12-12 02:04:23

问题


I have two questions:

1) Kernel-space process: When a process is executing in kernel mode, it does not receive any signals.

Instead a process puts itself in a wait-queue when it expects to receive completion of any event. Such as completion of an I/O event. The process does not do anything at this stage. Once the event is triggered, (the kernel sets a trap ? Correct if wrong) and finally the process is waked up and resumes execution.

Above is the case for expected events or (synchronous). But i wish to understand, how the process executing in kernel mode comes to know the occurrence of asynchronous events?

2) User-space process: Does the kernel always sets a trap to intimate a process executing in user-space to intimate that the signal has received? (Once the pending-signals-mask is set?)

Please answer this question with respect to the implementation in Linux (or it's flavors).

来源:https://stackoverflow.com/questions/7722183/how-does-a-process-executing-in-kernel-space-come-to-know-of-occurrence-of-unexp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!