DOC PREVIEW
UMD CMSC 412 - Project 2 Roadmap

This preview shows page 1-2-23-24 out of 24 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Project 2 Roadmap++ Awwww! ugly slides.HANDLING BBBBBBBBBBBBBB….. Review 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 OutputSystem Calls  Sys_Signal: register a signal handler  Sys_Kill: send a signal  Sys_RegDeliver: initialize signal handling for a process  Sys_WaitNoPID: wait for any child process to die  Sys_ReturnSignal: indicate completion of signal handlerSystem Calls  Sys_Signal: register a signal handler  Sys_Kill: send a signal  Sys_RegDeliver: initialize signal handling for a process  Sys_WaitNoPID: wait for any child process to die  Sys_ReturnSignal: indicate completion of signal handler Referenced in user codeHANDLING BBBBBBBBBBBBBB….. Review 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 OutputSystem Calls  Sys_Signal: register a signal handler  Sys_Kill: send a signal  Sys_RegDeliver: initialize signal handling for a process  Sys_WaitNoPID: wait for any child process to die  Sys_ReturnSignal: indicate completion of signal handlerSystem Calls  Sys_Signal: register a signal handler  Sys_Kill: send a signal  Sys_RegDeliver: initialize signal handling for a process  Sys_WaitNoPID: wait for any child process to die  Sys_ReturnSignal: indicate completion of signal handler Executed by stub code once a signal has been handledHelper Functions  Send_Signal  Set_Handler  Check_Pending_Signal  Setup_Frame  Complete_HandlerReview Process A main() { for(1000) Print “A” Kill(B, SIGUSR1) } Process B function handler() { Print “HANDLING” } main() { Signal(&handler, SIGUSR1) for(;;) Print “B” }Overview A BOverview A B RegDeliver RegDeliver Signal(SIGCHILD) Signal(SIGCHILD, ….)Helper Functions  Send_Signal  Set_Handler  Check_Pending_Signal  Setup_Frame  Complete_Handler Look at SchedulerScheduler: w/o signals A scheduler B B src/geekos/lowlevel.asmScheduler: w/ signals A B’s user level sig. hand. B scheduler BScheduler: w/ signals A B’s user level sig. hand. B scheduler B Check Pending SignalCheck Pending Signal  Boolean output  Determines whether to proceed with signal handlingScheduler: w/ signals A B’s user level sig. hand. B scheduler B CheckPending Signal true falseScheduler: w/ signals A B’s user level sig. hand. B scheduler B CheckPending Signal Setup FrameSetup Frame  Sets up state to enable user-level handling code executionScheduler: w/ signals A B’s user level sig. hand. B scheduler B CheckPending Signal Setup FrameSetup Frame  Sets up state to enable user-level handling code execution  How are functions called?Function Calls  Parameter of return address is stored on the stack so when finished  Pop off stack  Continue execution  Setup Frame  Enables user stack to keep:  Interrupt_State Vector  Return addressStoring Return Address  Want complete_handler to execute once user level handling done.  Hack (well kind of)  Place address of return_signal as return address on stack  Now return_signal stored as functionScheduler: w/ signals A B’s user level sig. hand. B scheduler B CheckPending Signal Setup Frame


View Full Document

UMD CMSC 412 - Project 2 Roadmap

Documents in this Course
Security

Security

65 pages

Deadlocks

Deadlocks

22 pages

Set 2

Set 2

70 pages

Project 2

Project 2

21 pages

Load more
Download Project 2 Roadmap
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Project 2 Roadmap and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Project 2 Roadmap 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?