Learning Objectives
By the end of this topic you will be able to:
Explain what a device driver is and why it is needed
Describe the concept of a virtual machine
Distinguish between Type 1 (bare metal) and Type 2 (hosted) hypervisors
Evaluate use cases and advantages of virtualisation
Device Drivers
What is a Device Driver?
A device driver is software that allows the OS to communicate with and control a hardware device. Each device (printer, GPU, NIC, USB device) requires a specific driver.
Why needed: hardware devices vary enormously in design. Drivers provide a uniform interface to the OS, abstracting hardware-specific details.
OS interaction: the OS calls generic I/O functions; the driver translates these into hardware-specific commands sent to the device registers.
Kernel mode vs user mode: most drivers run in kernel mode with direct hardware access. Buggy drivers can cause system crashes (BSoD).
When you install a new device, the OS looks for and installs a driver. Without it, the OS cannot communicate with the device.
Virtual Machines
What is a Virtual Machine?
A virtual machine (VM) is a software emulation of a complete computer system. A single physical host can run multiple VMs simultaneously, each with its own OS, applications and virtual hardware.
Each VM believes it has exclusive access to physical hardware, but it is actually sharing resources with other VMs and the host.
VMs are isolated from each other — a crash or security breach in one VM does not affect others.
The hypervisor (Virtual Machine Monitor/VMM) manages VM creation, resource allocation and isolation.
Uses of VMs
Advantages and Use Cases
Server consolidation: run multiple server VMs on one physical server, reducing hardware costs and power consumption
Testing and development: test software on different OS configurations without buying separate hardware; snapshot and rollback features
Security (sandboxing): run untrusted software in an isolated VM; malware cannot escape to the host
Disaster recovery: VMs can be rapidly deployed on new hardware if a physical server fails; VMs stored as files that can be backed up
VMs form the foundation of modern cloud computing — AWS EC2, Azure VMs, and GCP Compute Engine are all VM-based IaaS services.
Common Mistakes
Don’t Lose Marks
!
Saying a VM is “just another computer” — a VM is a software emulation that shares the physical hardware of the host. Always mention the hypervisor managing resource allocation and isolation.
!
Confusing Type 1 and Type 2 hypervisors: Type 1 runs directly on hardware (no host OS). Type 2 runs on top of a host OS. In exams, state which layer the hypervisor sits at.
!
Saying device drivers are hardware — they are software. The OS uses them to talk to hardware. A driver is loaded into memory and runs as code, typically in kernel mode.