COMPSCI 377 Lecture Notes - Lecture 3: System Call, Exception Handling, Fifo (Computing And Electronics)

46 views5 pages

Document Summary

How to efficiently virtualize the os with control. + just running the program directly to the cpu. + set up memory, registers, stack pointer, process, then run the program, and finally free memory and delete the process. + cons: os does not know weather what is okay to run. + cons: os need to share cpu processing with many processes to virtualize cpu. User mode (least privileged) to kernel mode (most privileged) System calls allow users to perform privileged actions. Allow access to file systems, creating and communicating with processes, allocating memory, etc. Executing a system call causes a trap instruction to form. +switch to kernel mode raise privilege level simultaneously. After execution, a return to trap instruction is performed. +returns to user mode and lowers privilege level simultaneously. Generally traps are similar to interrupts but the original program still runs. Traps save the state of the user processes by pushing pc, flags, and registers into the kernel stack.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents