OS & Hardware

Which correctly distinguishes containers from virtual machines?

  1. AEach container has its own OS kernel, while virtual machines share a kernel
  2. BContainers run on a hypervisor, while virtual machines run using only OS features
  3. CContainers share the kernel; each VM runs its own OS
Show answer and explanation

Answer: C. Containers share the kernel; each VM runs its own OS

Containers share a single OS kernel while partitioning file-system views, processes, networking and resource limits by group. Since no whole OS is booted, they are lightweight and start quickly. Virtual machines run on a hypervisor, each with its own OS including a kernel, which is heavier but gives stronger isolation and allows different OS types. Kernel sharing belongs to containers; watch for options that reverse the two.

  • A. It is containers that share the kernel; this is reversed.
  • B. It is virtual machines that run on a hypervisor.
  • C. Correct. Containers share the kernel; each VM runs its own OS.
Practice this topic Back to topic

More OS & Hardware questions

  1. Many OSes map the kernel into part of every process's address space (for example the upper range) and forbid user-mode access through page-table protection bits. What is the main advantage of this layout?
  2. With a 4 KB page size, how many virtual address bits represent the position within a page (the offset)?
  3. With 4 KB pages, which pair gives the page number and offset of the 32-bit virtual address 0x00403ABC?
  4. Which set of operating modes is defined by the RISC-V privileged architecture?
  5. When returning from an interrupt or exception handler, why is a dedicated return instruction (such as RISC-V's sret or mret) used instead of an ordinary function return?