Namespaces & cgroups

What Makes a Container

Containers are not lightweight VMs - they're isolated processes on the host kernel, built from two kernel features:

FeatureProvides
NamespacesIsolation - each container sees its own PIDs, network, mounts, hostname, users
cgroupsLimits - cap CPU, memory, I/O, PIDs per group of processes
Isolation vsVMContainer
KernelOwn kernelShares host kernel
Boot timeSeconds-minutesMilliseconds
OverheadHigh (full OS)Low
Isolation strengthStrong (hardware)Weaker (kernel)
Exam tip: The seven namespaces (PID, NET, MNT, UTS, IPC, USER, CGROUP) + cgroups are the answer to "how do containers isolate without a hypervisor?"