How do OS-level Namespaces and Cgroups enable the isolation required for containers?
Last updated
Namespaces partition what a process can see: its own
PIDtree,mountfilesystem view,networkinterfaces, plusUTS,IPC, anduserID mappings.Cgroups cap and account CPU, memory, and block I/O per process group. This stops a noisy container from starving others.
Both rely on the shared host kernel, so isolation is a kernel-enforced illusion. That makes containers lighter but less isolated than VMs.