Virtual Machine Fundamentals: Hypervisors, VM Types and Worked Address Translation
Build a precise mental model of virtual machines, then apply it to vCPU scheduling, two-stage address translation, virtual I/O and capacity checks.
KnowledgeGate Team
Exam prep & CS education

Virtual machine questions often mix four independent ideas: scope, hypervisor placement, execution control and kernel boundary. A system VM, a process VM, a Type 1 hypervisor and a container are not four answers on one scale. Broad architecture, snapshots, migration and a full host plan belong in Virtual Machines in Operating Systems: Hypervisors, Isolation and a Worked Resource Plan. Classification comes first here, followed by a two-stage translation from GVA 0x2A3C to HPA 0x2CA3C and short CPU, I/O and capacity checks. The CS Fundamentals for Exams & Placements category supplies the surrounding operating-system topics.
VM fundamentals begin with four independent questions
A virtual machine is an isolated, software-defined environment that presents CPU, memory and devices. Classify a scenario by asking four questions:
Scope: Does the abstraction present a complete hardware platform, one program runtime or isolated processes?
Placement: Does the hypervisor control hardware directly in the simplified Type 1 model, or run through a host OS as Type 2?
Execution control: Do privileged operations trap, use hardware guest mode or cross an explicit hypercall interface?
Kernel boundary: Does the workload boot a guest kernel or share the host kernel?
The physical host sits below the hypervisor or virtual machine monitor, which presents virtual hardware to a guest OS and its applications. A vCPU is schedulable rather than permanently tied to one physical core. Guest physical memory behaves like RAM to the guest but remains an intermediate address space. A virtual device is the guest-facing interface to a mediated or assigned device.
These answers can be combined. Type 1 placement does not by itself imply a system VM, full virtualization, hardware assistance or device pass-through. Keep each axis separate before choosing an option.
VM scope and hypervisor placement are separate axes
Term | What it virtualises or provides | Lifetime | Kernel relationship | Example shape |
|---|---|---|---|---|
System VM | Hardware platform | Longer than one application | Boots guest kernel | Guest computer |
Process VM | Program runtime | Program lifetime | Runs above OS | JVM bytecode runtime |
Container | Isolated processes | Workload lifetime | Shares host kernel | Namespaced application |
Type 1 hypervisor | VM control on hardware in the simplified model | Host lifetime | Controls guests | Bare-hardware layer |
Type 2 hypervisor | VM control through host OS | Application lifetime | Uses host OS | Hosted VM application |
System versus process VM answers what abstraction exists. Type 1 versus Type 2 answers where VM control is placed. Full, paravirtual, hardware-assisted and OS-level virtualization answer how privileged work or isolation is implemented; Virtualization Techniques Explained: Full, Para, Hardware-Assisted and OS-Level follows one protected operation across those four mechanisms.
A guest kernel and virtual hardware indicate a system VM. One application executing inside a language runtime indicates a process VM. Isolated workloads that share the host kernel are containers, not merely smaller system VMs. A real platform may combine Type 1 placement, hardware-assisted CPU execution and paravirtual I/O.
Privilege control and vCPU scheduling test different properties
A guest OS acts as if it controls privileged state, while the hypervisor retains final control. Under trap-and-emulate, a sensitive operation exits; the hypervisor validates and applies its guest-specific effect, updates state and resumes execution. Hardware assistance supplies a distinct guest context, but ordinary instructions do not all trap. Placement, privilege handling and CPU scheduling remain separate questions.
For the scheduling check, take physical CPUs P0 and P1. VM-A has vCPUs A0 and A1; VM-B has B0.
Time slot | P0 | P1 |
|---|---|---|
0-10 ms | A0 | A1 |
10-20 ms | B0 | A0 |
20-30 ms | A1 | B0 |
Host capacity is 2 x 30 = 60 CPU-ms. VM-A receives four 10 ms allocations, or 40 CPU-ms; VM-B receives two, or 20 CPU-ms. The sum is 40 + 20 = 60 CPU-ms. At most two vCPUs execute together, while time-multiplexing lets all three progress. A production scheduler may also apply weights, affinity, fairness and load balancing, but no policy can exceed the interval's physical capacity.

Worked example: guest virtual to host physical address
Use 4 KiB = 4096 bytes = 0x1000 pages and GVA 0x2A3C. The guest maps page 0x2 to frame 0x15; the second stage maps that frame to host frame 0x2C.
Split the GVA. Dividing
0x2A3Cby0x1000gives virtual page0x2and offset0xA3C.Apply the guest mapping. The frame base is
0x15 x 0x1000 = 0x15000. Therefore,GPA = 0x15000 + 0xA3C = 0x15A3C.Apply the second-stage mapping. The host frame base is
0x2C x 0x1000 = 0x2C000. Therefore,HPA = 0x2C000 + 0xA3C = 0x2CA3C.
The offset remains 0xA3C because page size is unchanged, and 0xA3C < 0x1000. A missing guest mapping is a guest page fault; a missing or disallowed second-stage mapping needs hypervisor handling. A TLB may cache the combined translation.

An I/O path changes device mediation, not VM type
Device handling adds another independent axis. Emulation presents a familiar interface while the hypervisor translates operations. A paravirtual driver uses a guest-aware interface to avoid some emulation. Pass-through assigns hardware more directly, but can limit sharing, migration or snapshots. None of these labels decides whether the hypervisor is Type 1 or Type 2.
With 512-byte sectors, a 4 KiB read at virtual sector 2048 starts at 2048 x 512 = 1,048,576 bytes = 1 MiB and spans 4096 / 512 = 8 sectors. Storage maps it to a host backend hidden from the guest. Emulated data is real, and pass-through means neither zero overhead nor unlimited sharing.
Configured memory, working set and isolation are separate checks
Admission and weighted-sharing arithmetic are developed in VM Integration in Operating Systems: Resource Pooling, Virtual I/O and Worked Examples. For the smaller configuration-versus-working-set check, take an 8-core host with 16 GiB RAM. A 2 GiB reserve leaves 14 GiB for guests. VM-A has 2 vCPUs and 4 GiB, VM-B has 4 and 6 GiB, and VM-C has 4 and 5 GiB. The total is 10 vCPUs and 15 GiB of configured guest RAM, so strict memory admission is short by 1 GiB.
Configured maxima differ from active working sets. If A uses 3 GiB, B uses 5 GiB and C uses 4 GiB, guests currently use 12 GiB. Adding the reserve gives 14 GiB, leaving 2 GiB of the physical 16 GiB unused. At full configured demand, 15 + 2 = 17 GiB, which is 1 GiB beyond capacity. The policy must reclaim, balloon, swap, throttle or reject an allocation.
Overcommit improves utilisation when peaks differ, but creates no capacity. Isolation cannot remove contention for caches, memory bandwidth, storage or networks.
Exam method: classify first, then trace or calculate
Use the same decision order for definition questions and numericals:
Name the scope: whole guest machine, one program runtime or shared-kernel process group.
Answer placement separately: Type 1 or Type 2 says where the hypervisor sits, not which virtualization mechanism it uses.
Trace control: identify which operation transfers to the hypervisor and which state it may change.
Preserve the page offset: guest and host frame numbers change, while the offset remains fixed for equal page sizes.
Check physical capacity: subtract reserves, sum configured demand, and distinguish it from the active working set.
Try five drills: classify a bytecode runtime and a full guest OS; translate GVA 0x2A3C; compare 15 GiB with a 14 GiB budget; decide how many of three vCPUs can execute on two CPUs.
Answers: process VM; system VM; HPA 0x2CA3C; 1 GiB overcommit; at most two vCPUs. The recurring traps are mixing classification axes, treating a vCPU as a dedicated core, equating guest physical with host physical, or treating overcommit as new hardware.
VM fundamentals: the compact decision rule
First classify scope, placement, execution mechanism and kernel boundary independently. Then trace the resource in question: a vCPU through the scheduler, a virtual address through guest and second-stage tables, an I/O request through its device path, or configured memory against the host budget.
From page size 0x1000, GVA 0x2A3C, 0x2 -> 0x15 and 0x15 -> 0x2C, rebuild GPA 0x15A3C and HPA 0x2CA3C, then explain why 0xA3C remains unchanged. Redraw both figures and solve the five drills. Continue with GATE Guidance by Sanchit Sir for a structured GATE sequence.
Keep learning
Memory Hierarchy and Virtual Memory: paging, the TLB, and address translation
Memory hierarchy and virtual memory explained: registers to disk, locality, paging, page tables, the TLB, a worked address translation, and access time.
Virtual Machines in Operating Systems: Hypervisors, Isolation and a Worked Resource Plan
Follow one three-VM host plan from the hypervisor layer to CPU scheduling, address translation, virtual I/O, isolation, snapshots and migration.
VM Integration in Operating Systems: Resource Pooling, Virtual I/O and Worked Examples
See how a hypervisor connects guests to finite CPU, memory, storage and network pools. Work through admission, fair-share CPU and saturated-network calculations.
Segmentation and Hybrid Memory Management in OS: Address Translation with Worked Examples
Learn how pure segmentation and segmented paging translate logical addresses. Follow two complete worked examples, see where faults occur, and avoid common exam traps.





