Preventing Deadlock - Operating Systems and System Programming - Exams, Exams of Operating Systems

Main points of this exam paper are: Preventing Deadlock, Sentence Definition, Atomic, Deadlock, Disk Cylinder, Doubly Indirect, Contiguous Allocation, Linked Allocation, Single-Level Index, Unix Multi-Level Index

Typology: Exams

2012/2013

Uploaded on 04/02/2013

shaina_44kin
shaina_44kin 🇮🇳

3.9

(9)

64 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS162, Spring/1992
Midterm #2
Professor Thomas Anderson
General Information:
This is a closed book examination. You have 60 minutes to answer as many question as possible. The
number in parentheses at the beginning of each question indicates the number of points given to the question;
there are 60 points in all. Write all of your answers directly on this paper. Make your anwers as concise as
possible (you needn't cover every available nano-acre with writing).
Problem #1 (6 points)
For each of the following statements, indicate in one sentence whether the statement is true or false, and why.
(a) Binary semaphores are those that are used by no more than two threads.
(b) The Banker's algorithm is a way of preventing deadlock
(c) A multi-level indexed file permits faster random access than a contiguously allocated file.
Problem #2 (8 points)
For each of the following items, write a sentence definition:
(a) Atomic
(b) Deadlock
(c) Disk cylinder
(d) Doubly indirect block
Problem #3 (8 points)
A thread can be in one of thre states: ready to run, running, or blocked. For each transition indicated below,
identify under what circumstances it occurs:
(a) ready -> running
(b) running -> ready
(c) running -> blocked
(d) blocked -> ready
CS162, Midterm #2, Spring/1992
CS162, Spring/1992 Midterm #2 Professor Thomas Anderson 1
pf2

Partial preview of the text

Download Preventing Deadlock - Operating Systems and System Programming - Exams and more Exams Operating Systems in PDF only on Docsity!

CS162, Spring/

Midterm

Professor Thomas Anderson

General Information: This is a closed book examination. You have 60 minutes to answer as many question as possible. The number in parentheses at the beginning of each question indicates the number of points given to the question; there are 60 points in all. Write all of your answers directly on this paper. Make your anwers as concise as possible (you needn't cover every available nano-acre with writing).

Problem #1 (6 points)

For each of the following statements, indicate in one sentence whether the statement is true or false, and why. (a) Binary semaphores are those that are used by no more than two threads. (b) The Banker's algorithm is a way of preventing deadlock (c) A multi-level indexed file permits faster random access than a contiguously allocated file.

Problem #2 (8 points)

For each of the following items, write a sentence definition: (a) Atomic (b) Deadlock (c) Disk cylinder (d) Doubly indirect block

Problem #3 (8 points)

A thread can be in one of thre states: ready to run, running, or blocked. For each transition indicated below, identify under what circumstances it occurs: (a) ready -> running (b) running -> ready (c) running -> blocked (d) blocked -> ready

CS162, Midterm #2, Spring/

CS162, Spring/1992 Midterm #2 Professor Thomas Anderson 1

Problem #4 (8 points)

The Demos system employs a clever block group indexed scheme for file allocation on disk. State the principle advantage of this scheme compared to each of the following, and justify your answer: (a) contiguous allocation (b) linked allocation (c) a single-level index (d) a UNIX multi-level index

Problem

(a) (b) (c) (2 points) Can a student "starve" in your solution, in other words, not have his/her question answered? Why or why not?

Problem #6 (10 points)

There are two ways to implement capabilities. What are they? Explain how they work.

Problem #7 Extra Double Secret Bonus Question (2 points)

Of the two planets described in Ursula LeGuin's "The Dispossessed," which would you rather live on?

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 mailto:[email protected]

CS162, Midterm #2, Spring/

Problem #4 (8 points) 2