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 Spring 2005 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 12 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 Spring 2005 2 1. [8 points] Suppose that when a process requests an I/O operation, the process is moved to a system state reserved for such processes. Would it make sense to use a pure FIFO protocol to manage the processes in that state? Explain why or why not. No. It is certainly possible that I/O requests for two or more processes may be carried out concurrently, especially if they involve different hardware devices. It is also the case that the time required to service I/O requests varies widely. So, there is no reason to believe that I/O requests will be completed in the same order in which processes make those requests. Given that, using a FIFO strategy would impose unnecessary waits on some processes that were unfortunate enough to be caught behind processes with I/O requests that take a long time to complete. 2. [8 points] Suppose that a process is executing on a multitasking system, and that the current process instruction requires modifying the value of a variable that is stored in primary memory, but not in a data register in the CPU. Suppose that the scheduler is implemented so that a context switch is triggered every time a process behaves in this manner. Describe the implications of that design decision. Typical processes spend a great deal of time modifying the values of variables, and it is common for a relatively large number of variables to be in scope at any time during process execution. Therefore, the scenario described above is highly likely to occur. If a context switch was required every time, there would be a number of nasty consequences:...
View Full Document
- Spring '08
- Operating Systems