Study Atlas › Computer Science › Systems

Virtualisation and containers

Running multiple isolated systems on one machine with virtual machines or lightweight containers.

Edited by Alex C, EduAlx · Sources cited below

Explanation

Hypervisors (type 1: Xen, KVM, ESXi; type 2: VirtualBox) virtualise hardware. Containers (Docker, 2013) share the host kernel using namespaces and cgroups, starting in milliseconds. Kubernetes (open-sourced by Google, 2014) orchestrates containers at scale. Popek and Goldberg set out virtualisation requirements (1974).

Example

A web app packaged as a Docker image runs identically on a laptop and in the cloud.

Code

# Dockerfile
FROM python:3.12-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
CMD ["python", "app.py"]

How it works, step by step

  1. Package app and dependencies into an image
  2. Runtime creates isolated namespaces
  3. cgroups limit CPU and memory
  4. Orchestrator schedules and scales containers

Open the interactive page with diagrams →

People behind it

References

  1. G. J. Popek, R. P. Goldberg, Commun. ACM 1974, 17, 412–421.

Textbooks

Related topics

Cloud computingFile systems and storageOperating systems: processes, scheduling and memoryConcurrency: deadlock and synchronisationDistributed systems: CAP theorem and consensusPipelining and parallel processorsComputer security fundamentals (CIA triad)Memory hierarchy and cachesHash functions and digital signaturesAutomata and formal languages