CMSC 412 Final (Spring 1998)

(20 points) Define (or explain) the following terms:

a)       I/O (disk) protection

b)       semaphore (as a synchronization abstraction)

c)       server

d)       critical section

e)       monitor (as a synchronization abstraction)

2.)                 (15 points) Explain the differences between short, medium, and long term scheduling.Be specific in the goals of each type of scheduling and the resources being managed.

3.)                 (20 Points) Computer networks can be arranged as a buses, stars, rings, or meshes.Define each of these topologies and list one advantage for each.

4.)                 (25 points)Consider a machine that supports a 44 bit virtual address, a page size of 16k (214) bytes, that each page table entry is 8 bytes, and that uses conventional page tables.

a)       What is the maximum number of page faults that could possibly be associated with any memory reference (you may assume memory references are aligned).

b)       Assume that we accessed 224 contiguous elements of an integer array (integers are 4 bytes).What is the maximum number of page faults that can occur?

c)       On some machines translation look-aside buffer (TLB) misses trap into the operating system, and on other systems they are handled by the hardware.Give two advantages of each approach.

5.)                 (30 points) Synchronization.

a)       Sally Smartcoder is worried about synchronization in a system where multiple processes are running on different processors sharing memory.Her application has 10,000 disjoint shared objects (i.e., they are used and updated separately). To handle synchronization she declares one semaphore, mutex, for the entire application.Why might this approach not be the best one.

b)       Explain why a spin (busy waiting) followed by a semaphore (if the lock isnít acquired after a short timeout) is a useful type of synchronization for parallel computers, but just a semaphore is better for single processor systems.

c)       Given an atomic test-and-set instruction, show how you could build an atomic swap.

6.)                 (25 Points) RPC Bundlers. One of the problems with RPC bundlers is how to pass a pointer based data structure (such as a graph or a tree) to a remote machine.

a)       Describe a way to achieve a deep copy (transfer of the entire data structure) to the remote machine.

b)       If a data structure is large, performing a deep copy can transfer too much data that is often not needed for the RPC.Describe how you could implement a shallow copy that only transferred part of the data structure with the initial RPC, but still permits access to the entire data structure by the remote process.

7.)                 (15 points) UNIX includes a feature called a setuid bit.When this bit is set, a program can execute with either the privilege of the user starting the command or the user who owns the executable image.Explain why it is important to ensuring security to clear this bit before letting someone run a debugger.