CMSC 412 Midterm #2 (Spring 2003)

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

a)                   Inverted Page Table

b)                   Virtual Address

c)                   Rotational Latency

d)                   Thrashing

2.)                 (20 points) Memory Systems: Consider a system with an average memory access time of 100 nano-seconds, a three level page table (meta-directory, directory, and page table). For full credit, your answer must be a single number and not a formula.

a)                   If the system had an average page fault rate of 0.01% for any page accessed (data or page table related), and an average page fault took 1msec to service, what is the effective memory access time (assume no TLB or memory cache).

b)                   Now assume the system has no page faults, we are considering adding a TLB that will take 1 nano-second to lookup an address translation. What hit rate (to the nearest 5%) in the TLB is required to reduce the effective access time to memory by a factor of 2.5?

3.)                 (20 Points) Synchronization: Given a multi-processor system that supports a single global lock via: Lock(). Unlock(), and the ability to suspend a process with a Wait(id) call, and the ability to wakeup all processes waiting on an id, with Wakup(id).  Show how to implement counting semaphores.

typedef struct {

} Semaphore;

P(Semaphore *sem)

V(Semaphore *sem)

4.)                 (15 points) File Abstraction

a)                   (10 points) Explain why the write and close system calls may not result in data immediately being written to disk.

b)                    (5 points) Does the seek system call result in a disk head moving (explain your answer)?

5.)                  (10 points) Explain how you were able to use the accessed bit in the IA-32 (aka x86) processor to simulate LRU page replacement in the project. How is this a more accurate approximation than a simple second chance algorithm?

6.)                 (15 points) Filesystems

a)                   (5 points) List two issues that must be addressed to handle DAG directories (vs. simple tree directories)

b)                    (5 points) What are the 12 protection bits used in a UNIX filesystem? 

c)                    (5 points) How can an access control list be used to represent negative rights to a file or directory?