Loading...
Draw the layers between an application and physical hardware. Choose an isolation approach from operating-system needs, startup cost, resource use and the consequences of sharing a kernel.
What you'll be able to do
A system virtual machine presents virtual hardware managed by a hypervisor. Each guest can run its own operating-system kernel, system libraries and applications. A type-1 hypervisor runs directly on hardware; a hosted type-2 arrangement runs with a host OS. Both still require real processing, memory and storage underneath their abstractions.
Separate guests can support different operating-system environments and independent configurations on one physical host. This can suit testing software across OS versions or running legacy services. Allocated memory, virtual-disk space and guest startup take resources, while contention and virtualisation overhead can affect performance. A snapshot helps capture a state but is not automatically an independent, tested backup.
A container packages an application and its user-space dependencies and runs it as isolated processes using a container runtime. Containers on a native container host share the host’s kernel; each does not boot a complete independent guest kernel. Isolation and resource controls separate process views and limit access when configured correctly. An image is the packaged template; a container is a running instance with its runtime state.
Kernel sharing often reduces startup and memory overhead compared with booting a full guest OS for each service. It also means kernel compatibility matters. A Linux container does not simply bring a Windows kernel inside its image. Desktop tools can use a supporting VM to supply the required kernel, and cloud containers frequently run inside VMs. These combined arrangements do not remove the distinction between the two isolation layers.
For many small instances of the same Linux service, containers can support repeatable dependency packaging and efficient scaling. For a task requiring a different guest kernel or a whole independent OS environment, system VMs can be more appropriate. State the reason using the workload rather than claiming one technology always runs faster or is always secure.
A container shares an important trust boundary at the host kernel; excessive privileges, exposed secrets or a kernel vulnerability can undermine isolation. VMs also depend on hypervisor and guest configuration. Persistent data need an explicit storage and recovery design: deleting a replaceable application instance must not be assumed to retain every change made inside it. The exam skill is to complete a layer diagram and connect these mechanisms to a justified recommendation.
| Layer or property | System VM model | Native container model |
|---|---|---|
| Application and libraries | Inside each guest | Packaged per application/container |
| Kernel | Separate guest kernel per VM | Host kernel shared by containers |
| Management layer | Hypervisor and virtual hardware | Container runtime and OS isolation |
| Typical trade-off | Independent OS environments; larger per-guest footprint | Lighter instances; kernel compatibility and shared-kernel boundary |
Attempt the task before opening its worked response. Record each change of state, explain the rule used, and check the result against the original requirements. Code examples labelled Python 3 use that language’s conventions; pseudocode states its own assumptions.
Common mistakes to avoid
Key takeaways
Test yourself
Answer a few questions, then review anything you missed.
Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.