CMSC 412 Midterm #2 (Spring 2004)

 

 

 

 


Name _________________________

Signature ________________________


 

 

 

 

(1)  This exam is closed book, closed notes, and closed neighbor. No calculators are permitted. Violation of any of these rules will be considered academic dishonestly.

 

(2)  You have 70 minutes to complete this exam.  If you finish early, you may turn in your exam at the front of the room and leave.  However if you finish during the last ten minutes of the exam please remain seated until the end of the exam so you don't disturb others. Failure to follow this direction will result in points being deducted from your exam.

 

(3)  Write all answers on the exam.  If you need additional paper, I will provide it. Make sure your name is on any additional sheets.

 

(4)     Partial credit will be given for most questions assuming I can figure out what you were doing.

 

(5)     Please write neatly. Print your answers if your handwriting is hard to read.  If you write something, and wish to cross it out, simply put an X through it.  Please indicate if your answer continues onto another page.

 

 

 

 

 

 

Question

Possible

Score

1

20

 

2

20

 

3

20

 

4

20

 

5

20

 

Total

100

 

 

 


1.)                 (20 points) Define and explain the following terms:

a)                   TLB

 

 

 

 

b)                   Multi-level Indexed (File) Allocation

 

 

 

 

 

c)                   Seek Time

 

 

 

 

 

d)                   Working Set


2.)                 (20 points) Memory Systems

a)                   (10 points) Give two disadvantages of using FIFO page allocation?

 

 

 

 

 

 

 

 

 

b)                   (10 points) What advantage of inverted page tables increases on 64-bit processors compared to 32-bit systems?

 


3.)                  (20 Points) Synchronization: Given an implementation of binary semaphores, implement counting semaphores.

Declarations:

 

 

P()

 

 

 

 

 

 

 

V()

 

 

 

 

 

 


4.)                 (20 points) File Systems

a)                   (10 points) Assuming no data is cached in memory, what is the best-case (minimum) number of disk accesses to read the 1 millionth byte of a file located in the root directory of a UNIX file System using 4096 byte blocks. For full credit explain what each read is for.

 

 

 

 

 

 

 

 

 

b)                   (10 points) Give two advantages of adding a log (or journal) to a traditionally organized file system

 

 

 

 

 


5.)                 (20 points) Project

a)                   (6 points) When you paged out a page, why did your code need to call flushTLB?

 

 

 

 

 

b)                   (7 points) Why did you need to call getPagingFileInfo to find the first disk block of the paging file, instead of using 0?

 

 

 

 

 

c)                   (7 points) What changes would you need to make to your project to make page tables pageable?

Web Accessibility