Part 1 of 6 · 1 min read
Why this page comes second
In this module you will
- Explain how a virtual processor is scheduled and what overcommitting processors means.
- Describe the three levels of memory address in a VM and the two page tables that map them.
- Compare shadow page tables with nested paging, and compute the references for a nested page walk.
- Explain memory ballooning, and find the balloon device on a Linux guest.
- Say what happens when the promised memory of all guests exceeds the real memory.
Page 1 explained that a guest runs deprivileged and traps to a hypervisor. This page covers what is shared on the two scarcest resources, the processor and memory. The processor side reuses the scheduling of Level 3, and the memory side reuses the page tables, the TLB and the page replacement of Levels 6 and 7. Page 3 then covers devices.
About this example About this example
Real: The C program was compiled with gcc -Wall -Wextra and run on the Linux test machine (a KVM guest, kernel 6.18). The balloon device, its driver and its interrupt lines were read from /sys/bus/virtio/devices and /proc/interrupts on that machine.
Scripted: The 64 GiB host with 80 GiB promised to guests and the 100 ns memory time are made up to show the idea. The miss rate of 1 in 100 is made up.
Not real: The test machine does not expose vmx or /dev/kvm, so it cannot run its own guests, and the page-walk numbers come from the formula and not from a hardware counter.