






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The cs162 operating systems midterm exam held at the university of california, berkeley in spring 2002. The exam covers various topics related to operating systems, including short answer questions, cpu scheduling, and concurrency problems. Students are required to answer questions directly on the paper and make their answers as concise as possible.
Typology: Exams
1 / 10
This page cannot be seen from the preview
Don't miss anything!







University of California, Berkeley College of Engineering Computer Science Division – EECS
Spring 2002 Anthony D. Joseph
March 13, 2002 CS162 Operating Systems
Your Name:
SID AND 162 Login:
TA:
Discussion Section:
General Information: This is a closed book and notes examination. You have ninety 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!
Problem Possible Score 1 20
Total 100
ii)
b. (12 points) Which of the following instructions should be allowed only in kernel mode? State whether it is or not (circle one) and why. i) Disable all interrupts.
Kernel Kernel and User
Why?
ii) Read the time-of-day clock.
Kernel Kernel and User
Why?
iii) Set the time-of-day clock.
Kernel Kernel and User
Why?
iii) First-come, First-served (run in order 10, 6, 2, 4, 8).
iv) Shortest Job First.
c. (8 points) Five jobs are waiting to be run. Their expected running times are 9, 6, 3, 5, and X. In what order should they be run to minimize average response time? State the scheduling algorithm that should be used AND the order in which the jobs should be run. (Your answer will depend on X).
The following is an excerpt from a Wall Street Journal article:
This page intentionally left blank as scratch space.
Consider a system that starts with a total of 150 units of memory, which is then allocated to three processes as shown in the following table of processes, their maximum resource requirements, and their current allocations:
Process Max Demand Currently Holds P1 70 45 P2 60 40 P3 60 15 P4 60
Determine whether it would be safe to grant each of the following requests. If YES, give an execution order that could be guaranteed possible. If NO, show the resulting allocation table.
a. (5 points) A fourth process arrives, with a maximum memory need of 60 and an initial request for 25 units.
b. (5 points) Using the original table above, a fourth process arrives, with a maximum memory need of 60 and an initial request for 35 units.
This page intentionally left blank as scratch space.