CMSC 412 Final
†(20 points) Define (or explain) the following
I/O (disk) protection
semaphore (as a synchronization abstraction)
monitor (as a synchronization abstraction)
†(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.
†(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.
†(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.
What is the maximum number of page faults that could possibly
be associated with any memory reference (you may assume memory references are
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?
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
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.
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.
Given an atomic test-and-set instruction, show how you could
build an atomic swap.
†(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.†
Describe a way to achieve a deep copy (transfer of the entire
data structure) to the remote machine.
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.
†(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.