Sp00 midterm 2 - University of California, Berkeley College...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
University of California, Berkeley College of Engineering Computer Science Division – EECS Spring 2000 Prof. Michael J. Franklin Midterm Exam #2 – Solutions and Grading Standard April 10, 2000 CS 162 Operating Systems Your Name: M.I. Wright SID and 162 Login: 123456189 cs162xx TA Name: O.S. Wizard Discussion Section: Sundays 3:15 am General Information: This is a closed book examination. You have 1 hour and 20 minutes to answer as many questions as possible. Partial credit will be given. There are 100 points in all. You should read all of the questions before starting the exam, as some of the questions are substantially more time-consuming than others. Write all of your answers directly on this paper. Be sure to clearly indicate your final answer for each question. Also, be sure to state any assumptions that you are making in your answers. Please try to be as concise as possible . GOOD LUCK!!! Problem Possible Score 1. CPU Scheduling (5 parts) 20 20 2. Demand Paging (6 parts) 30 30 3. Caching (3 parts) 20 20 4. Address Translation (3 parts) 20 20 5. Disk Management (2 parts) 10 10 TOTAL 100 101 (can’t add)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
April 10, 2000 Page 2 of 10 Question 1 [5 parts, 20 points total]: CPU Scheduling a) (4 points) Assume that 3 processes all with requirements of 1 second of CPU time each and no I/O arrive at the same time. What will be the average response time (i.e., average time to completion) for the processes under FIFO scheduling? Answer: 2 seconds no partial credit b) (4 points) Answer part “a” for Round Robin (RR) scheduling assuming a timeslice of 0.1 sec and no overhead for context switches (i.e., context switches are free). Answer: 2.9 seconds no partial credit c) (4 points) Answer part “a” for Shortest Job First (SJF) scheduling. Answer: 2 seconds no partial credit d) (4 points) Multilevel Feedback Queue Scheduling (MFQS) is a fairly good, general CPU scheduling algorithm, but as initially described in class, can lead to starvation under certain circumstances. Briefly describe how starvation can occur using MFQS and how to modify MFQS so that starvation can be avoided. Long jobs on low-priority queues can starve if a continuous stream of short jobs keep the high-priority queues full. Soln: hold a lottery among the QUEUES, weighted in favor of short queues OR implement aging, so that jobs that remain on low-priority queues for a long time are promoted 2 pts for starvation explanation 2 pts for correct solution e) (4 points) What advantage is there in having different time-quantum (i.e. timeslice) sizes on different levels of the MFQS approach? 1) different time quanta help differentiate between long and short jobs 2) for long jobs, short quanta mean unnecessary context switches (so different time quanta improve throughput) 3) Introduces more fairness The first two answers received full credit. Fairness received 2 points
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This homework help was uploaded on 01/30/2008 for the course CS 162 taught by Professor Kubiatowicz during the Spring '02 term at University of California, Berkeley.

Page1 / 10

Sp00 midterm 2 - University of California, Berkeley College...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online