

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, spring 1998 midterm #1 exam for professor alan smith's operating system concepts course at the university of california, berkeley. The exam covers topics such as processes and threads, scheduling, synchronization, and deadlock. Students are required to answer questions related to these topics, including providing code for implementing certain algorithms.
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Explain the difference between a process and a thread. Define both. What are the tradeoffs between using one and using the other? (14)
We discussed two mathematical quantities that are reasonable targets for optimization in scheduling: minimizing ave(f(i)) and minimizing ave(f(i)/s(i)). Please explain what each is, and explain why we would like to minimize it. (14)
Please provide code (of the same sort used in class) that will implement P & V using the "swap" operation described in class. (18)
What is the difference between an interrupt and a trap? Define both. Please give at least two examples of each. (12)
Why does rollback usually require checkpoints? Please define both terms and explain. (11)
For each of FIFO, SRPT, and RR (Q=.25), and for the following set of arrival and service times, please show a time line for which process is executing, and compute the mean flow time. Show your computations. (We might give partial credit, if you made a simple and obvious error; we're not going to try to decode your calculations if they aren't obvious.) (15)
  arrival service A 0 1. B .3. C 1.1 1.
For the following two cases, please either show a complete safe sequence or show that there isn't one. (16)
PROCESS has-X has-Y max needs-X max needs-Y A 10 20 75 50 B 0 70 50 90
CS 162, Midterm #1, Spring 1998
CS162, Spring 1998 Midterm #1 Professor Alan Smith 1
a. available: X: 40 Y: 40 b. available: X: 40 Y: 35
CS 162, Midterm #1, Spring 1998
Problem #7 2