
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth analysis of signal handling in operating systems through a review of processes a and b. It covers the registration and delivery of signals, system calls, and helper functions. The document also discusses the scheduler and its behavior with and without signals.
Typology: Study Guides, Projects, Research
1 / 24
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