Potpourri Consider the following lock algorithm using T&S: while ((L == locked) or (T&S(L) == locked)) { while (L == locked); // spin delay (d[Pi]); // different delays for different processors } // success if we are here [2 points] (Answer True/False with justification) (No credit without justification) This algorithm does not rely on hardware cache coherence.
Blog
Paravirtualization The context for this question is the same…
Paravirtualization The context for this question is the same as the previous question. Above picture shows the I/O ring data structure used in Xen to facilitate communication between the guest OS and Xen. Guest-OS places a request in the I/O ring using the “Request Producer” pointer. Xen places a response in the I/O ring using the “Response Producer” pointer. [2 points] Why does Xen typically not run out of space to place a response on this ring? State the invariant briefly.
LRPC and Scheduling The context for this question is the sam…
LRPC and Scheduling The context for this question is the same as the previous question. A server provides the following procedure via LRPC uint64_t sum_array(const uint64_t *arr, size_t len) { uint64_t sum = 0; for (size_t i = 0; i < len; ++i) { sum += arr[i]; } return sum;} The kernel will create an A-stack and map that into the client and server address spaces. Assume the following: (uint64_t is 8 bytes and size_t is 4 bytes) There is programming language support for the server to access the A-stack directly. [2 points] Prior to executing the server procedure, what is the action on the server side so far as A-stack is concerned?
LRPC and Scheduling The context for this question is the sam…
LRPC and Scheduling The context for this question is the same as the previous question. A server provides the following procedure via LRPC uint64_t sum_array(const uint64_t *arr, size_t len) { uint64_t sum = 0; for (size_t i = 0; i < len; ++i) { sum += arr[i]; } return sum;} The kernel will create an A-stack and map that into the client and server address spaces. Assume the following: (uint64_t is 8 bytes and size_t is 4 bytes) There is programming language support for the server to access the A-stack directly. [2 points] If the server wishes to entertain simultaneous calls from multiple clients, how big should the A-stack be?
Memory Management [3 points] A datacenter uses ballooning to…
Memory Management [3 points] A datacenter uses ballooning to allocate or reclaim memory from VMs. The hypervisor has a policy that taxes 20% of a VM’s idle memory, starting with the VM that has the most idle memory. The hypervisor can tax over multiple rounds until the request of a VM is met. Consider this scenario: VM1 requests 100 MB of additional memory. The hypervisor has no free machine memory VM2 has an idle memory of 140 MB VM3 has an idle memory of 200 MB List the steps taken by the hypervisor to satisfy VM1’s request.
Potpourri [2 points] (True/False with justification) Every v…
Potpourri [2 points] (True/False with justification) Every virtual memory access by a process in a fully virtualized environment goes through the guest OS to map the virtual page number (VPN) to physical page number (PPN); and then through the hypervisor to map the PPN to machine page number (MPN).
Full Virtualization [2 points] “Physical memory is an illusi…
Full Virtualization [2 points] “Physical memory is an illusion of the guest OS in a fully virtualized environment”. Explain what this means.
Lock/Barriers [2 points] Name two important properties that…
Lock/Barriers [2 points] Name two important properties that an implementation of the mutual exclusion lock algorithm should satisfy.
Having a high body weight automatically means a person has a…
Having a high body weight automatically means a person has a high body fat percentage.
As people age, they typically lose muscle mass and gain fat…
As people age, they typically lose muscle mass and gain fat mass if they do not engage in regular physical activity.