CS262A Reading Summary 34

Disco: Running Commodity Operating Systems on Scalable Multiprocessors

E. Bugnion et al.
Summary by Feng Zhou
11/21/2002

3 things in the paper,
  1. There are two motivations for implementing a virtual machine monitor on a NUMA machine. First, it is much cheaper to port an existing/commodity OS to a virtual machine than develop a new OS for a NUMA machine. Second, running several virtual machines on a physical machine concurrenly can possibly yield better resource utilization, better support legacy application and also provide fault containment for each VM.
  2. The biggest problem to solve is reducing overheads. The basic principle used in Disco is to minimize VM monitor intervention during the execution of guest OS. One technique is using processor protection mode to trap to Disco only when necessary, such as at times of TLB miss and I/O operations. Because TLB is software loaded in MIPS, Disco intercept TLB miss traps and translate the physical address provides by the guest OS to actual machine address on the fly. Therefore later accesses to virtual memory will be directly translated to actual machine addresses by hardware with the help of TLB. NUMA memory management techniques including page replication and migration are also used, with help from hardware cache miss counters.
  3. For I/O devices, in general special device drivers are added to the guest OS to directly access device interface provided by Disco. There is one technique for optimizaing DMA requests, which applies to disk access and network interface access. A global cache in main memory is used to avoid copying the the same block of data used by multiple VMs. This is done by intercepting the DMA operations. Whenever a VM request to read something from a shared disk, it is checked against the cache. If it's there, Disco simply do a memory mapping to return the result to the VM. For network access, the data sent from one VM to another is also simply remapped to save one data copy. Copy-on-write is used to ensure correct modification semantics.
1 flaw:

Virtual physical memory is done in Disco by catching TLB misses. However, this only applies to the MIPS architecture. Nearly all other architectures use hardware loaded TLB. The paper doesn't propose a way to provide virtual physical memory without the ability to catch TLB misses, which is often true. It seems that there isn't a simple solution to this. So it may be a considerable problem for implementing virtual machines efficiently on other architectures.