开发者

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

开发者 https://www.devze.com 2023-04-12 07:51 出处:网络
I have two questions: 1) Kernel-space process: When a process is executing in kernel mode, it does not receive any signals.

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 exp开发者_JAVA技巧ects 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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号