A virtual machine (VM) is a software emulation of a computer system. It runs on a physical host machine using a layer of software called a hypervisor. The VM behaves as if it were a real, isolated computer.
Runs directly on the physical hardware — no host OS required. More efficient.
Examples: VMware ESXi, Microsoft Hyper-V, Xen
Used for: enterprise server virtualisation, cloud computing
Runs on top of an existing host operating system. Easier to install and use.
Examples: VirtualBox, VMware Workstation, Parallels
Used for: development and testing on desktop machines
Java compiles source code to bytecode — an intermediate, platform-neutral representation. The JVM (Java Virtual Machine) interprets the bytecode on any platform.
"Write Once, Run Anywhere"
The same compiled bytecode can run on Windows, Linux, macOS, or Android — as long as a JVM is installed. Python works similarly using the CPython interpreter/VM.
Determines which process gets CPU time. Algorithms include:
Process states: Ready → Running → Blocked → Ready (cycle)
Allocates and manages RAM. Key techniques:
Organises files in a hierarchical directory structure. Manages creation, deletion, access permissions. File systems: FAT32 (older, simpler), NTFS (Windows, journalling, permissions, large files), ext4 (Linux).
Drivers provide an abstraction layer between the OS and hardware devices. A program calls a standard OS API; the driver translates this to device-specific commands. Interrupt-driven I/O: device signals completion via interrupt rather than the CPU polling continuously.
Watch 4 processes share the CPU using round-robin scheduling. Each gets a time quantum. Click Run to animate.
1. Explain what is meant by a virtual machine and give two reasons why a software company might use virtual machines during software development. [5 marks]
Mark scheme:
2. Java source code is compiled to bytecode rather than native machine code. Explain the advantage of this approach. [3 marks]
Mark scheme:
3. Describe how virtual memory allows a computer to run programs that require more memory than is physically available in RAM. [4 marks]
Mark scheme:
4. Compare round-robin and priority scheduling algorithms. Refer to fairness and the risk of process starvation. [4 marks]
Mark scheme: