CS162 Operating Systems Midterm Exam, Spring 2006, Exams of Operating Systems

University of california, berkeley cs162 operating systems midterm exam held on march 8, 2006. The exam includes short answer questions on lottery scheduling, inverted page tables, shared memory, and operating system illusions, as well as cpu scheduling problems and scheduling algorithm pros and cons.

Typology: Exams

2012/2013

Uploaded on 04/02/2013

shailesh_pr1c
shailesh_pr1c 🇮🇳

4.7

(7)

60 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1/10
University of California, Berkeley
College of Engineering
Computer Science Division EECS
Spring 2006 Anthony D. Joseph
Midterm Exam
March 8, 2006
CS162 Operating Systems
Your Name:
SID AND 162 Login:
TA Name:
Discussion Section
Time:
General Information:
This is a closed book and notes examination. You have 90 minutes to answer as many questions
as possible. The number in parentheses at the beginning of each question indicates the number of
points given to the question; 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.
Write all of your answers directly on this paper. Make your answers as concise as possible. If there
is something in a question that you believe is open to interpretation, then please ask us about it!
Good Luck!!
Problem Possible Score
1 21
2 54
3 12
4 13
Total
100
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download CS162 Operating Systems Midterm Exam, Spring 2006 and more Exams Operating Systems in PDF only on Docsity!

University of California, Berkeley College of Engineering Computer Science Division – EECS

Spring 2006 Anthony D. Joseph

Midterm Exam

March 8, 2006 CS162 Operating Systems

Your Name:

SID AND 162 Login:

TA Name:

Discussion Section Time:

General Information: This is a closed book and notes examination. You have 90 minutes to answer as many questions as possible. The number in parentheses at the beginning of each question indicates the number of points given to the question; 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.

Write all of your answers directly on this paper. Make your answers as concise as possible. If there is something in a question that you believe is open to interpretation, then please ask us about it!

Good Luck!!

Problem Possible Score

1^21

2^54

3^12

Total 100

  1. (21 points total) Short answer questions: a. (4 points) True/False and Why? Lottery scheduling can be used to implement any other scheduling algorithm.

TRUE FALSE Why?

b. (5 points) Inverted Page Tables: i) (3 points) Give a two to three sentence description of an inverted page table.

ii) (2 points) Briefly (2-3 sentences) state the problem it is intended to solve.

c. (4 points) Why would two processes want to use shared memory for communication instead of using message passing? Your answer should be brief (no more than 5 sentences).

  1. (54 points total) CPU Scheduling. Here is a table of processes and their associated arrival and running times. Process ID Arrival Time Expected CPU Running Time Process 1 0 5 Process 2 3 5 Process 3 5 3 Process 4 7 2

a. (15 points) Show the scheduling order for these processes under First-In-First-Out (FIFO), Shortest-Job First (SJF), and Round-Robin (RR) with a quantum = 1 time unit. Assume that the context switch overhead is 0 and new processes are added to the head of the queue except for FIFO. Time FIFO SJF RR 0 1 2 3 4 5 6 7 8 9

b. (18 points) For each process in each schedule above, indicate the queue wait time and turnaround time (TRT).

Scheduler Process 1 Process 2 Process 3 Process 4 FIFO queue wait

FIFO TRT

SJF queue wait

SJF TRT

RR queue wait

RR TRT

The queue wait time is the total time a thread spends in the wait queue. The turnaround time is defined as the time a process takes to complete after it arrives.

ii) (3 points) Round Robin. (1) Pros:

(2) Cons:

(3) Bad choice example:

iii) (3 points) Shortest Job First/Shortest Remaining Time First (1) Pros:

(2) Cons:

(3) Bad choice example:

iv) (3 points) Lottery (1) Pros:

(2) Cons:

(3) Bad choice example:

No CreditProblem X (000000000000 points)

The 2005 Ig Nobel Prize Winners

The 2005 Ig Nobel Prizes were awarded on Thursday October 6, 2005 at the 15th^ First Annual Ig Nobel Prize Ceremony, at Harvard's Sanders Theatre.

AGRICULTURAL HISTORY: James Watson of Massey University, New Zealand, for his scholarly study, "The Significance of Mr. Richard Buckley’s Exploding Trousers." REFERENCE: "The Significance of Mr. Richard Buckley’s Exploding Trousers: Reflections on an Aspect of Technological Change in New Zealand Dairy -Farming between the World Wars," James Watson, Agricultural History, vol. 78, no. 3, Summer 2004, pp. 346-60.

PHYSICS: John Mainstone and the late Thomas Parnell of the University of Queensland, Australia, for patiently conducting an experiment that began in the year 1927 – in which a glob of congealed black tar has been slowly, slowly dripping through a funnel, at a rate of approximately one drop every nine years. REFERENCE: "The Pitch Drop Experiment," R. Edgeworth, B.J. Dalton and T. Parnell, European Journal of Physics, 1984, pp. 198-200.

MEDICINE: Gregg A. Miller of Oak Grove, Missouri, for inventing Neuticles – artificial replacement testicles for dogs, which are available in three sizes, and three degrees of firmness. REFERENCES: US Patent #5868140, and the book Going Going NUTS!, by Gregg A. Miller, PublishAmerica, 2004, ISBN 1413753167.

LITERATURE: The Internet entrepreneurs of Nigeria, for creating and then using e-mail to distribute a bold series of short stories, thus introducing millions of readers to a cast of rich characters – General Sani Abacha, Mrs. Mariam Sanni Abacha, Barrister Jon A Mbeki Esq., and others -- each of whom requires just a small amount of expense money so as to obtain access to the great wealth to which they are entitled and which they would like to share with the kind person who assists them.

PEACE: Claire Rind and Peter Simmons of Newcastle University, in the U.K., for electrically monitoring the activity of a brain cell in a locust while that locust was watching selected highlights from the movie "Star Wars." REFERENCE: "Orthopteran DCMD Neuron: A Reevaluation of Responses to Moving Objects. I. Selective Responses to Approaching Objects," F.C. Rind and P.J. Simmons, Journal of Neurophysiology, vol. 68, no. 5, November 1992, pp. 1654-66.

ECONOMICS: Gauri Nanda of the Massachusetts Institute of Technology, for inventing an alarm clock that runs away and hides, repeatedly, thus ensuring that people DO get out of bed, and thus theoretically adding many productive hours to the workday.

CHEMISTRY: Edward Cussler of the University of Minnesota and Brian Gettelfinger of the University of Minnesota and the University of Wisconsin, for conducting a careful experiment to settle the longstanding scientific question: can people swim faster in syrup or in water? REFERENCE: "Will Humans Swim Faster or Slower in Syrup?" American Institute of Chemical Engineers

NUTRITION: Dr. Yoshiro Nakamats of Tokyo, Japan, for photographing and retrospectively analyzing every meal he has consumed during a period of 34 years (and counting).

FLUID DYNAMICS: Victor Benno Meyer-Rochow of International University Bremen, Germany and the University of Oulu , Finland; and Jozsef Gal of Loránd Eötvös University, Hungary, for using basic principles of physics to calculate the pressure that builds up inside a penguin, as detailed in their report "Pressures Produced When Penguins Pooh -- Calculations on Avian Defaecation." PUBLISHED IN: Polar Biology, vol. 27, 2003, pp. 56-8.

  1. (13 points) Virtual Memory. The Lemon company has hired you to design the virtual memory system for their new line of desktop computers, the iniM caM. Each computer will have 32 bit virtual and physical addresses, and memory will be allocated in 2 KByte pages.

a. (4 points) For a single- level page table, how many bits will be used to index the page, and how many will be the offset within the page? i) (2 points) Number of bits for page number?

ii) (2 points) Number of bits for offset within the page?

b. (5 points) Each page table entry will also include three bits for bookkeeping (Valid, Read, and Write bits). i) (2 points) How many bytes are required for each page table entry?

ii) (3 points) How much physical memory is required to store the table?

c. (4 points) If the iniM caM has 16 megabytes or less of physical memory, we can use 24 bit physical addresses (and still have 32 bit virtual addresses). How large would each page table entry and the entire table be now?