Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Traps and interrupts are mechanisms used to transfer control between user processes and the operating system. Tell us where we can find the first
1. Traps and interrupts are mechanisms used to transfer control between user processes and the operating system. Tell us where we can find the first line of OS/161 code that is executed when a trap occurs. Then tell us where control gets transferred to from that point (i.e., what function services the trap). Be sure to describe the control flow for each type of trap that may occur (e.g., system calls, VM faults, and hardware interrupts). Answer: 2. Where is the first line of code for constructing a trapframe? Describe at a high level what the code is doing here. Answer: 3. Each OS/161 exception has its own code. What are the exception codes for the exceptions: interrupt, system call, and arithmetic overflow? Answer: 4. What information is saved in struct trapframe? Answer: 5. What is the name of the function that is the system-call handler in OS/161? In which directory is this function implementation located? Answer: 6. The kernel's main function is to provide support for user-level programs. Most such support is accessed via "system calls". For example, consider the system call reboot(), which is implemented in the function sys_reboot) in src/kern/main/main.c. Using GDB, put a breakpoint on sys reboot and run the "reboot" program (by typing "p sbin/reboot" at the OS/161 menu prompt). Use "backtrace" to see how it got there. Show the output of your debugging session as well as the output printed by the OS/16
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started