- LPU MCA Semester 1
- CAP470
- 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
Which Linux features give containers their isolation and resource limits?
- Namespaces and cgroups
- Bootloaders and swap partitions
- Printers and spoolers only
- 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.
Why do containers start much faster than virtual machines?
- They have a separate kernel that is much smaller than a VM kernel
- They share the host kernel and skip booting a guest OS
- They use a physical machine for each container
- 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.