LearnViz CompSci
Home / Learn / Operating Systems / Hypervisors

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

  1. A type 1 hypervisor runs directly on the hardware.
  2. It creates virtual machines.
  3. Each VM gets virtual CPUs, memory and disks.
  4. Hardware virtualization support such as VT-x makes it efficient.
  5. 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

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Operating Systems quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Hypervisors?
Software creating and running virtual machines. It belongs to Operating Systems and is an advanced-level topic.
Where do people use Hypervisors?
Public clouds, private data centers, development laptops and security research environments rely on hypervisors.
What is the most common mistake with Hypervisors?
Hypervisor bugs can compromise all guests, so keeping them minimal and patched matters.
What should I learn before this topic?
Start with Containers, the topic just before it in Operating Systems.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Operating Systems quiz.
Is Hypervisors hard to learn?
It is an Advanced topic. Expect to read the explanation more than once and to connect it with earlier topics. Working through a small example by hand helps most.
How long does it take to learn Hypervisors?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Hypervisors?
Containers, Namespaces and Cgroups, Virtualization are closely connected. The full list is in the related topics section of this page.
What should I study after Hypervisors?
Continue with Namespaces and Cgroups, the next topic in Operating Systems.

Related topics