Practice Exam 1
Practice Exam 1
(a) [4 points] What is the best strategy that OS1 and OS2 can take to
schedule these applications on top of Exokernel?
(b) [4 points] Currently OS1 is executing its ML application. Timer goes off.
List the steps taken by Exokernel upon this interrupt.
(c) [2 points] How does Exokernel maintain fairness for CPU time
consumed by library OSes
• Paged virtual memory system with a processor register called PTBR that points
to the page table in memory to enable hardware address translation.
2. [2 points] (Select all that apply; Note: +x for correct choice; - x for
incorrect choice) Packing multiple small protection domain into
one hardware address space will result in:
Reduced explicit cost on context switch between protection domains
Reduced page faults in the system
Reduced TLB misses
Increased misses in the cache
Two VMs are currently running. VM1 has 3 processes running; VM2 has 4
processes running.
Assume the size the hardware page table is 1 MB.
What is the total memory overhead incurred by the Hypervisor for the above
configuration? Show your work for any credit.
List the steps taken by the hypervisor to satisfy the memory request of VM1.
• Partition B is CC-NUMA
What guarantees are needed from the architecture to ensure that it provides
sequential consistency memory model to the programmer?
(a) [1 point] What hardware features and properties does this lock
algorithm require (other than calculating different delays for different
processors)?
(b) [2 points] We need to know which programs are not well-suited to use
this lock. What are the program characteristics that would negatively
impact the program’s performance with this lock algorithm
implementation? In what way does it reduce performance?
(c) [2 points] We need to know which programs are well-suited to use this
lock. What are the program characteristics that would enhance the
program’s performance with this lock algorithm implementation? In what
way does it improve performance?
(a) [2 points] Compared with the lock algorithm with delay in a previous
question, what is the advantage of ticket lock’s different method of
determining the amount of delay? From a programmer’s perspective what
is the added value of this algorithm compared to the lock algorithm with
delay in the previous question?
(b) [1.5 points] What are the downsides of the ticket lock algorithm for
systems with write-update cache coherence? Briefly explain your answer.
(b) [1.5 points] What are the downsides of the ticket lock algorithm for
systems with write-invalidate cache coherence? Briefly explain your
answer.
Barriers [4 points]
2. [4 points] Given the following picture of the dissemination
algorithm, focusing on node P4, what information does P4 know
at the end of round 1? Explain your answer.
The server always expects the actual parameters of the call to be in its stack.
a. [2 point] Calculate the total client wait time after calling the procedure
‘foo’, if the server and client were collocated in the same process.
b. [3 points] Calculate the total client wait time after calling the procedure
‘foo’, if the server and client were two different processes, and the OS does
not optimize the RPC workflow for processes running on the same
machine.
c. [3 points] Calculate the total client wait time after calling the procedure
‘foo’, if the server and client were two different processes, and the OS
optimizes the RPC workflow for processes running on the same machine
(Lightweight-RPC). Note that this is not the first time this client is calling
the procedure ‘foo’ on the server.
d. [3 points] What architectural change is required to further reduce the
total wait time of the client? Calculate the wait time after calling procedure
‘foo’ in this case.
Use A
Code fragment:
Node N1 Node N2
Modify(A); Lock (L);
Signal(C); Unlock(L);
(a) [2 points]: The DSM software uses SC memory model. Will the
above program fragment work per programmer’s intent? Why or
Why not?
(b) [2 points]: The DSM software uses RC memory model. Will the
above program fragment work per programmer’s intent? Why or
Why not?
(c) [2 points]: The DSM software is Treadmarks which uses LRC
memory model. Will the above program fragment work per
programmer’s intent? Why or Why not?
1. [2 points] (Answer True/False with justification) “SPIN and
Exokernel are fair in comparing the superiority of their respective
specialization approaches for OS services relative to Mach micro-
kernel.”
A descriptor of the data to be written, not the data itself. [+2] The student might
also mention that the request contains some metadata describing the write
request, but this is not required.
(b)[4 points] Access to the ring data structure is through several pointers.
For the disk write, describe in order the sequence of pointer modifications
from request production to response consumption. Assume that there is
space in the I/O ring for the Guest OS to enqueue a new request. For each
modification, state: a. who makes the modification (guest or hypervisor). b.
which pointer is modified. c. what the pointer modification is.
(c) [1 point] How long from time zero does it take for the first response to be
available to the guest OS?
(d) [1 point] How long from time zero does it take for the last response to be
available to the guest OS?