
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















Process A main() { for(1000) Print “A” Kill(B, SIGUSR1) } Process B function handler() { Print “HANDLING” } main() { Signal(&handler, SIGUSR1) for(;;) Print “B” } AABBAABBAABB……… 1000 A’S
Sys_Signal: register a signal handler Sys_Kill: send a signal Sys_RegDeliver: initialize signal handling for a
Sys_WaitNoPID: wait for any child process to die Sys_ReturnSignal: indicate completion of signal
Referenced in user code
Process A main() { for(1000) Print “A” Kill(B, SIGUSR1) } Process B function handler() { Print “HANDLING” } main() { Signal(&handler, SIGUSR1) for(;;) Print “B” } AABBAABBAABB……… 1000 A’S Output
Sys_Signal: register a signal handler Sys_Kill: send a signal Sys_RegDeliver: initialize signal handling for a
Sys_WaitNoPID: wait for any child process to die Sys_ReturnSignal: indicate completion of signal
Executed by stub code once a signal has been handled
RegDeliver RegDeliver Signal(SIGCHILD) Signal(SIGCHILD, ….)
scheduler B
src/geekos/lowlevel.asm
B’s user level sig. hand.
scheduler B
Boolean output Determines whether to proceed with signal handling
B’s user level sig. hand.
scheduler B Check Pending Signal true false
Sets up state to enable user-level handling code execution
B’s user level sig. hand.
scheduler B Check Pending Signal Setup Frame