Advanced Topic 47 of 51 Operating Systems
Hypervisors
Software creating and running virtual machines.
How it works
A hypervisor, or virtual machine monitor, creates and runs virtual machines. A type 1 or bare-metal hypervisor, such as Xen, ESXi and KVM in Linux, runs directly on hardware, while a type 2 hypervisor, such as VirtualBox or VMware Workstation, runs as an application on a host OS. It traps privileged guest operations, schedules virtual CPUs, manages memory with shadow or nested page tables and emulates or passes through devices.
Step-by-step walkthrough
- A type 1 hypervisor runs directly on the hardware.
- It creates virtual machines.
- Each VM gets virtual CPUs, memory and disks.
- Hardware virtualization support such as VT-x makes it efficient.
- A type 2 hypervisor runs as a normal program on a host OS.
Where it is used
Public clouds, private data centers, development laptops and security research environments rely on hypervisors. Features include live migration, snapshots and resource quotas.
Common pitfall
Hypervisor bugs can compromise all guests, so keeping them minimal and patched matters. Overcommitting resources leads to noisy-neighbor problems. Passthrough devices limit migration. Emulated devices are slow compared with paravirtual drivers such as virtio, so install guest drivers for better performance.
Where it fits in the course
Hypervisors is topic 47 of 51 in Operating Systems, rated Advanced. It follows Containers. The next topic is Namespaces and Cgroups.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Operating Systems quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Operating Systems quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Hypervisors?
Where do people use Hypervisors?
What is the most common mistake with Hypervisors?
What should I learn before this topic?
How can I practice it?
Is Hypervisors hard to learn?
How long does it take to learn Hypervisors?
Which topics are related to Hypervisors?
What should I study after Hypervisors?
Related topics
- Containers (Operating Systems)
- Namespaces and Cgroups (Operating Systems)
- Virtualization (Operating Systems)
- Microkernels vs Monolithic Kernels (Operating Systems)