RTUComputer ScienceYr 2021 · Sem 72021

Q13Cloud Computing

Question

4 marks

Compare and contrast Virtual Machines and Containers.

Answer

A critical mathematical comparison between Virtual Machines and Docker Containers. Violently contrasts the heavy, hardware-level abstraction of Hypervisors against the ultra-lightweight, OS-level namespace isolation of Container engines.

Both VMs and Containers are virtualization architectures designed to mathematically isolate applications. However, they execute this isolation at completely different layers of the technology stack, resulting in massive differences in RAM consumption and boot speed.

VMs execute Hardware-Level Virtualization.

  • The Mechanism: A Hypervisor (like VMware or ESXi) sits directly on the physical hardware. It mathematically fakes a complete physical motherboard, CPU, and BIOS for every single VM.
  • The Guest OS: Because it fakes hardware, EVERY single VM must violently boot its own complete, heavy Operating System (Guest OS). If you run 10 VMs, you are running 10 complete copies of Windows or Linux.
  • Demerit: Horrific bloat. A VM requires Gigabytes of RAM just to hold the Guest OS, and takes minutes to physically boot. However, it provides absolute, mathematically impenetrable security isolation.

Containers execute OS-Level Virtualization.

  • The Mechanism: Containers violently abandon the Hypervisor. Instead, they use a Container Engine (like Docker) that sits on top of ONE single Host Operating System.
  • Namespace Isolation: The engine uses mathematical Linux kernel features (cgroups and namespaces) to isolate processes. Containers DO NOT have a Guest OS. They mathematically share the Host OS kernel.
  • Merit: Absolute explosive efficiency. A container is just an isolated process. It requires only Megabytes of RAM and boots in milliseconds. You can run 1,000 containers on a server that could only hold 10 VMs.
  • Demerit: Weaker security. If a hacker mathematically breaches the shared Host Kernel from inside one container, they violently compromise every single container on the server.
Back to Paper