Module 14: Virtualization Flashcards
virtualization
the ability for a computer to run multiple OSes on the same physical machine
host
the underlying physical machine hardware
virtual machine manager / hypervisor
software that allows creating and running virtual machines on the host machine; the VM’s each then run with their own operating systems and applications; the VMM manages the computing, memory, and storage resources required for the VMs
guest OS
user-level process that usually runs an OS system over the VMM hypervisor
host OS
the OS that runs on the hardware (for a type 2 hypervisor)
type 0 hypervisor
a hypervisor that’s implemented in firmware or hardware; hardware is statically partitioned across different guest OSes
type 1 hypervisor
the hypervisor itself essentially replaces the OS and runs in kernel mode; the guest OS believes it is running on bare metal
type 2 hypervisor
the VMM hypervisor runs on top of the host OS in user mode as a process; the host doesn’t know that the VMM is running guest OSes
sandboxing
a type of virtualization in which a tightly controlled environment with a guest OS and isolated set of resources is created to allow untested, unverified, or untrusted programs to run; this technique helps maintain security for the host machine or host OS
VM templating
create an OS system and application image, and clone it across multiple VMs saving installation the effort of doing manual software installations
virtual cpu (VCPU)
a software emulation of a CPU that represents the state of the CPU (including the PCB and execution state) for each of the guest OSes)
trap and emulate
when the guest OS of the VM attempts to execute a privileged instruction, since it is in user mode, the action will cause a “trap”; the VMM will handle the trap and execute the instruction attempted by the guest, then return control to the guest in user mode
binary translation
an alternative to trap and emulate in which instead of doing trap-and-emulate for every instruction that runs in the guest OS, the guest OS instructions are translated to equivalent instructions in the VMM. the original assembly code from the guest OS is simply translated to the code for the equivalent implementation in the VMM
CPU scheduling for virtualization
given multiple VCPUs and physical CPUs, the scheduling algorithm decides which VCPU to run next on a given CPU
memory management for virtualization
guest page table: maps the guest OSes virtual addresses to what the guest OS believes to be the physical addresses
host page table: the guest physical addresses are separately mapped to host virtual addresses
shadow page table: maintained by the VMM to map guest virtual addresses to host physical addresses, optimizing the translation process to manage virtualization; the shadow page table is loaded into the MMU during a context switch