Skip to main content

Virtual machine structure and benefits

Short answer

A virtual machine structure uses a hypervisor on bare hardware to create multiple virtual machines, each running its own guest OS. Benefits include complete isolation between VMs, running different OSs simultaneously, safe system development, better hardware utilization, and easy backup and migration.

Explain the virtual machine structure. What are the benefits over other operating system structures?

Structure

A virtual machine (VM) system (IBM VM/370) separates multiprogramming from the "extended machine" function. A bare-metal program called the virtual machine monitor (hypervisor) runs directly on the hardware and creates several virtual machines, each an exact copy of the real hardware (including kernel/user mode, I/O and interrupts). Each virtual machine runs its own operating system, which may be different on each VM.

 VM1         VM2         VM3
+-------+   +-------+   +-------+
| App   |   | App   |   | App   |
| Guest |   | Guest |   | Guest |
| OS 1  |   | OS 2  |   | OS 3  |
+-------+   +-------+   +-------+
+---------------------------------+
| Virtual machine monitor         |
+---------------------------------+
| Real hardware (CPU, RAM, disk)  |
+---------------------------------+

When an application makes a system call, it traps to the guest OS in its own VM. When that guest OS then executes a privileged instruction (for example, an I/O instruction), it traps to the monitor, which carries it out (emulates it) for that VM.

Benefits over other OS structures

  • Complete protection and isolation: VMs are separate, so a crash or virus in one VM does not affect the others or the host.
  • Different OSs on one machine: Linux, Windows and others run side by side, which helps portability testing.
  • Safe system development: OS development and testing can be done on a VM without halting the production machine.
  • Better hardware utilisation: many lightly loaded servers can be consolidated onto one physical machine.
  • Easy backup and migration: a VM image can be saved, cloned or moved to another host.

The drawbacks are slower I/O and CPU performance because of the extra layer, and difficulty in sharing resources between VMs.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Operating System chapter 1 questions →