Middle East Technical University

Middle East Technical University

<p> MIDDLE EAST TECHNICAL UNIVERSITY Department of Computer Engineering Ceng Ankara 06531, Turkey 334 Tel: +90 (312) 210 5577 Fax: +90 (312) 210 1259 - Operating Systems (F. P. Genç) Midterm 1 - 2’Th May 2007 Duration - 90 minutes</p><p>This is an open book exam. You may use your textbook and any notes you have. Collaboration, however, is not allowed. Read each question carefully and pace yourself. Please use a separate paper for each answer, using the back of page if necessary. When answering the questions please be considerate. Do not write anything which is not relevant to the question. Do not write too much detail.</p><p>Question 1 (25 points) Suppose we have an average page fault rate of 1 every 100,000 instructions, a normal instruction takes 1 microsecond, and a page fault causes the instruction to take 10 additional milliseconds. What is the average instruction time, taking page faults into account? What if the instruction time were halved? Suppose we used a different paging algorithm that took an additional millisecond per page fault, but reduced the page fault rate to one per 120,000 instructions: would this result in an increase in overall performance or not? Explain your reasoning. Question 2 (25 points) What is the difference between (1) a context switch and (2) a process switch? Consider a time-sharing operating system whose kernel executes (mostly) in the context of a process (e.g. UNIX). Which kind(s) of switch (typically) occur in this case upon the following events?  an user process calls one of its subroutines;  an user process calls a system call;  an user process's CPU time quantum expires; Assume, for simplicity, that there is one CPU only.</p><p>Question 3 (25 points) A certain demand paging system uses pages 8 KB wide. Reading a word from a page table (kept in RAM) involves a overhead of 500 nsec. To cope with this overhead, a TLB is used, which holds up to 64 entries (page/frame number pairs), and can do a lookup in 100 nsec. What hit ratio (proportion of TLB hits to total memory references) is needed to reduce the mean overhead to 200 nsec? What is the corresponding mean hit rate (in number of TLB hits per second)? [Hint: not all the above information about the system is relevant.] Question 4 (25 points) You are the system administrator of computer system whose OS uses a demand-paging virtual memory. A monitor program reports the following utilizations measures (fraction of time during which the device is busy):  CPU: 20%;  Paging disk: 97.7%;  Other I/O devices: 5%; </p><p>Which (if any) of the following actions will (probably) improve CPU utilization? Why? (5 points each) 1. Install a faster CPU. </p><p>1 2. Install a bigger paging disk. 3. Increase the degree of multiprogramming. Decrease the degree of multiprogramming. 4. Replace the other I/O device with faster ones. </p><p>2</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us