1. LPU MCA Semester 1
  2. CAP470
  3. Unit 3

CAP470 · Unit 3: Cloud virtualization

Containerization: benefits and container architecture elements

10 practice questions · in the MTE and ETE syllabus

Key points

  • Containers share the host kernel and start quickly
  • Images are read-only layers, containers add a writable layer
  • Namespaces isolate, cgroups limit
  • Use volumes for persistent data

Containerization packages an application with its libraries and settings into an isolated unit that runs on a shared host kernel.

Benefits: portability and consistency across laptop, test and cloud; fast startup (no guest OS boots); low overhead and high density; efficient scaling; and a good fit for microservices and CI/CD.

Architecture elements:

  • Image: a read-only, layered template of the app and dependencies.
  • Container: a running instance of an image with its own writable layer.
  • Container runtime: software such as containerd or runc that creates and runs containers.
  • Registry: a store for images, such as Docker Hub.
  • Namespaces isolate what a container sees, and cgroups limit what it uses.
  • Volumes keep data outside the container so it survives deletion.

Exam trap: the writable layer disappears with the container; use volumes for persistent data.

Try two questions

Question 1 · Tier 2, Understand

Which Linux features give containers their isolation and resource limits?

  1. Namespaces and cgroups
  2. Bootloaders and swap partitions
  3. Printers and spoolers only
  4. Compilers and linkers only
Show the answer

A. Namespaces isolate what a container can see, and cgroups limit what it can use.

Why not B: These are not the isolation mechanisms.

Why not C: These are not the isolation mechanisms.

Why not D: These are not the isolation mechanisms.

Question 2 · Tier 4, Analyse

Why do containers start much faster than virtual machines?

  1. They have a separate kernel that is much smaller than a VM kernel
  2. They share the host kernel and skip booting a guest OS
  3. They use a physical machine for each container
  4. They skip using memory and storage completely
Show the answer

B. Starting a process in a namespace avoids the long boot sequence of a guest OS.

Why not A: Containers do not have a separate kernel.

Why not C: Containers share one machine.

Why not D: Containers use memory and storage.