Information Technology Reference
In-Depth Information
into the processor to resume execution of the program. However, the han-
dler can also modify the state to be restored, e.g., if it wants to switch to
another user-level task.
The mechanism for delivering UNIX signals to user processes requires only
a small modification to what we have already described for transferring con-
trol across the kernel-user boundary. For example, on a timer interrupt, the
hardware and the kernel interrupt handler save the state of the user-level com-
putation. To deliver the timer interrupt to user-level, the kernel copies that
saved state to a user-level buffer, resets the saved state to point to the signal
handler and signal stack, and then exits the kernel handler. The reti instruc-
tion will then resume execution at the signal handler, rather than the original
program counter. When the signal handler returns, these steps are unwound:
the processor state is copied back from the signal handler into kernel memory,
and the reti then returns back to the original computation.
Search WWH ::




Custom Search