35. Medium Length Questions_Final Flashcards
We discussed three types of virtualization in class: full hardware virtualization, paravirtualization, and OS or container virtualization. First, clearly describe full hardware virtualization and give a brief overview of how it works (5 points). Second, list a virtualization use case that motivates the hardware virtualization approach (2 points)
Full hardware virtualization.
What is virtualized is the hardware interface.
The VM environment is provided by the virtual machine monitor or VMM.
Full hardware virtualization allows an unmodified guest OS and applications to run safely inside the VM.
To allow this to be done safely the guest OS is run without full kernel privilege but instead with a privilege level typical to user applications.
When the guest OS tries to do something that requires kernel privilege, ideally a trap will occur which the host OS will pass to the VMM to handle.
Unfortunately, on the x86 architecture many instructions do not trap properly and must be dynamically rewritten at runtime to be handled safely.
Full hardware virtualization is required any time that the guest OS cannot be modified, but has worse performance than other approaches due to the complicated path that traps and exceptions must take to return to the VMM.
We discussed three types of virtualization in class: full hardware virtualization, paravirtualization, and OS or container virtualization. First, clearly describe paravirtualization and give a brief overview of how it works (5 points). Second, list a virtualization use case that motivates the paravirtualization approach (2 points)
Paravirtualization.
What is virtualized is the hardware interface.
The VM environment is provided by the virtual machine monitor, but it is typically referred to as the hypervisor in this case.
Paravirtualization requires small changes ot the guest OS to replace privileged instructions with calls to a new API provided by the hypervisor, which inspects and handles all privileged operations that could pierce the VM.
For paravirtualization to perform well, interaction between the guest OS and the hypervisor must be efficient.
Paravirtualization is an excellent choice when OS-level isolation is required, or in cases where the virtualized hardware must support multiple operating systems.
It generally outperforms full hardware virtualization which should not be used if paravirtualization is an option.
We discussed three types of virtualization in class: full hardware virtualization, paravirtualization, and OS or container virtualization. First, clearly describe container virtualization and give a brief overview of how it works (5 points). Second, list a virtualization use case that motivates the container virtualization approach (2 points)
OS (container) virtualization.
What is virtualized is the OS namespace, allowing full isolation between multiple sets of applications running on top of the same OS, each in their own container.
In this case the OS itself provides the virtualized environment by extending names with container identifiers which allow it to distinguish between the resources used by processes running in different containers.
OS virtualization requires considerable support by the OS itself, which has to make changes to every part of the OS that uses a variety of different names: file names, process IDs, network identifiers, etc.
OS virtualization also requires that all containers use the same underlying OS and version of the OS interface.
OS virtualization is effective at packaging and distributing integrated software packages because containers can contain multiple apps and isolate their configurations from other software packages running on the same system - even other versions of the same software running in the container.