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).
精彩评论