This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS 3204 Operating Systems Midterm Fall 2004 1 V I R G I N I A P O L Y T E C H N I C I N S T I T U T E A N D S T A T E U N I V E R S I T Y U T P R O S I M Instructions: Print your name in the space provided below. This examination is closed book and closed notes. No calculators or other computing devices may be used. Answer each question in the space provided. If you need to continue an answer onto the back of a page, clearly indicate that and label the continuation with the question number. If you want partial credit, justify your answers, even when justification is not explicitly required. There are 10 questions, priced as marked. The maximum score is 100. When you have completed the test, sign the pledge at the bottom of this page and turn in the test. Note that either failing to return this test, or discussing its content with a student who has not taken it is a violation of the Honor Code. Do not start the test until instructed to do so! Name Solution printed Pledge: On my honor, I have neither given nor received unauthorized aid on this examination. signed CS 3204 Operating Systems Midterm Fall 2004 2 1. [6 points] Briefly describe the role the trap instruction plays, from the perspective of a user program. When a user program calls a system function, the user-accessible function is merely a stub that sets the system into kernel mode and then invokes the trap instruction in order to call the actual system function. The trap instruction searches the trap table for the address of the entry point of the matching actual system function and then issues an unconditional branch to that address. 2. [6 points] When the trap instruction was introduced, it was suggested that it might not be a good idea for a user program to be able to access the trap table (index) directly. Give an example of an undesirable possibility if a user program could modify the contents of the trap table....
View Full Document
- Fall '08
- Operating Systems