Week 14: Virtualization Flashcards
Virtualization :
the ability for a computer to run multiple operating systems on the
same physical machine
Host :
the underlying physical machine hardware
Virtual machine manager or 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 operating system
user-level process that usually runs an operating
system over the VMM hypervisor
Host operating system
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 operating systems
Type 1 hypervisor:
the hypervisor itself essentially replaces the operating
system 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 operating
system 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 operating system 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 operating system
VM templating :
create an operating system and application image, and clone it
across multiple machines, saving installation the effort of doing manual software
installations
Virtual CPU:
a software emulation of a CPU that represents the state of the CPU
(including the PCB and execution state) for each of the guest operating systems
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 :
alternative to trap and emulate in which instead of doing
trap-and-emulate for every instruction that runs in the guest operating system,
the guest OS instructions are translated on the fly to equivalent instructions in the
VMM. The original assembly code from the guest OS is simply translated to 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:
Host page table :
Shadow page table :
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
Host page table
the guest physical addresses are separately mapped to
host virtual addresses; the host page table maps the host virtual
addresses to the host physical addresses
Guest page table:
maps the guest OS’s virtual addresses to what the
guest OS believes to be physical addresses
Full virtualization:
the guest OS is unaware of the hypervisor and believes it is running on bare metal
Paravirtualization:
the guest OS is aware of the underlying hypervisor and thus implements optimizations given this knowledge; the shadow page table and
efficient I/O techniques are examples of paravirtualization
Efficient I/O :
circular buffer maintains all the intermediate I/O state
between the guest and the VMM through shared memory which results in
much better performance than dealing with the levels of indirection
between the guest OS and physical device
Application containment
containerization is an alternative to full virtualization
that allows isolating individual applications; the different containers run on the host operating system and have standard formats; the container virtualization
layer allows the containers to communicate and abstracts the specific host OS from the application containers
Microservices :
complicated applications are broken down into modular
components called microservice; each service is its own process
Programming environment virtualization:
a custom environment designed for a programming language that includes features that enable optimized execution (e.g. Java Virtual Machine)