CS162, Spring 1998 Midterm #1: Operating System Concepts, Exams of Operating Systems

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

2012/2013

Uploaded on 04/02/2013

shailesh_pr1c
shailesh_pr1c 🇮🇳

4.7

(7)

60 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS162, Spring 1998
Midterm #1
Professor Alan Smith
Problem #1
Explain the difference between a process and a thread. Define both. What are the tradeoffs between using one
and using the other? (14)
Problem #2
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)
Problem #3
Please provide code (of the same sort used in class) that will implement P & V using the "swap" operation
described in class. (18)
Problem #4
What is the difference between an interrupt and a trap? Define both. Please give at least two examples of
each. (12)
Problem #5
Why does rollback usually require checkpoints? Please define both terms and explain. (11)
Problem #6
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)
&nbsp arrival service
A 0 1.5
B .3 .8
C 1.1 1.1
Problem #7
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
pf2

Partial preview of the text

Download CS162, Spring 1998 Midterm #1: Operating System Concepts and more Exams Operating Systems in PDF only on Docsity!

CS162, Spring 1998

Midterm

Professor Alan Smith

Problem

Explain the difference between a process and a thread. Define both. What are the tradeoffs between using one and using the other? (14)

Problem

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)

Problem

Please provide code (of the same sort used in class) that will implement P & V using the "swap" operation described in class. (18)

Problem

What is the difference between an interrupt and a trap? Define both. Please give at least two examples of each. (12)

Problem

Why does rollback usually require checkpoints? Please define both terms and explain. (11)

Problem

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)

&nbsp arrival service A 0 1. B .3. C 1.1 1.

Problem

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

C 30 10 60 40

D 50 80 100 220

a. available: X: 40 Y: 40 b. available: X: 40 Y: 35

Posted by HKN (Electrical Engineering and Computer Science Honor Society)

University of California at Berkeley

If you have any questions about these online exams

please contact [email protected].

CS 162, Midterm #1, Spring 1998

Problem #7 2