Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS162 Fall 2004 Midterm 1 Exam, Exams of Operating Systems

The cs162 fall 2004 midterm 1 exam for professor alan jay smith's computer science course. The exam covers various topics such as inverted page tables, segmentation, job scheduling, and mutual exclusion. Students are expected to answer questions related to these topics and demonstrate their understanding of the concepts.

Typology: Exams

2012/2013

Uploaded on 04/02/2013

shaina_44kin
shaina_44kin 🇮🇳

3.9

(9)

68 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS162 Fall 2004 Professor Alan Jay Smith
Midterm 1, Monday, October 11, 2004
(Total Points Possible: 100)
1. What's an inverted page table? What are the relationships between the size of the inverted
page table, the size of the virtual address space, and the size of the physical address space?
(14)
1/7
pf3
pf4
pf5

Partial preview of the text

Download CS162 Fall 2004 Midterm 1 Exam and more Exams Operating Systems in PDF only on Docsity!

CS162 Fall 2004 Professor Alan Jay Smith

Midterm 1, Monday, October 11, 2004

(Total Points Possible: 100)

  1. What's an inverted page table? What are the relationships between the size of the inverted page table, the size of the virtual address space, and the size of the physical address space? (14)
  1. Suppose that you have an architecture with a base register (for relocation) but no bounds register. What is the advantage of this design relative to a system with no base register? What is the disadvantage of this design relative to a system with both base and bounds registers? (14)
  1. For the following two cases, please either show a complete safe sequence or prove that there isn't one: (12)

Process has-X has-Y max-needs-X max-needs-Y A 35 10 65 40 B 55 80 105 220 C 35 20 110 50 D 0 70 50 90

(a) available: X: 40 Y: 40 (b) available: X: 40 Y: 35

  1. Prove that Shortest Job First is optimal (minimum average time to completion, averaged over all of the jobs) in a system which starts with exactly N jobs, each of whose run times are known, and no which no further jobs arrive. (16)
  1. Assume that we have atomic operations: [increment value in memory, and then load the result] and [decrement value in memory].

The following "code" was given in lecture to obtain mutual exclusion for a critical section. What's wrong with it? Please explain. (13)

Init: A = 0

loop: {increment A in memory, load A}, if A~=1, then {decrement A in memory}, go to loop

critical section here

{decrement memory location A}