Containers vs Processes vs Virtual Machines Quiz
17 Questions
2 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the technique that consists of running multiple operating systems on a computer simultaneously?

  • Hypervisor
  • Paravirtualization
  • Virtualization (correct)
  • Containerization

What is a hypervisor?

  • A machine running on distinct computers
  • A type of container in Docker
  • A process that enhances security
  • A software that creates and executes virtual machines (correct)

What is a disadvantage of virtualization mentioned in the text?

  • Augments hardware costs
  • Increases complexity and consumes resources (correct)
  • Improves scalability
  • Facilitates management

Which type of virtualization has a hypervisor that runs directly on host hardware?

<p>Type1 paravirtualization (D)</p> Signup and view all the answers

What is the main reason for using virtualization according to the text?

<p>To run multiple OS/applications on the same machine (A)</p> Signup and view all the answers

In virtualization, what does a hypervisor do?

<p>Executes virtual machines and allocates hardware resources (D)</p> Signup and view all the answers

What is the main difference between a Process, Container, and VM?

<p>Containers are lightweight, isolated groups of processes sharing the same kernel, while Virtual Machines (VMs) have their own kernel and run multiple independent operating systems. (D)</p> Signup and view all the answers

How does Docker utilize the concept of a distributed system of servers?

<p>By allowing the emulation of multiple daemons with their respective containers as a service. (A)</p> Signup and view all the answers

What role does the Docker engine play in managing containers?

<p>It acts as a client-server application that communicates with the server to manage containers through a REST API. (B)</p> Signup and view all the answers

How do Containers differ from Virtual Machines (VMs) in terms of resource allocation?

<p>Containers share the host kernel with minimal overhead, while VMs have their own kernel and require more computer overhead. (B)</p> Signup and view all the answers

What is the main advantage of having multiple independent operating systems in Virtual Machines (VMs)?

<p>Enhanced security due to isolation of each operating system environment. (B)</p> Signup and view all the answers

How does Docker differ from traditional virtualization methods?

<p>Docker uses a shared kernel approach, whereas traditional virtualization methods like VMs have separate kernels for each instance. (D)</p> Signup and view all the answers

What command is used to run an interactive Docker container with a specific name?

<p>docker run -it --name mon-linux-shell ubuntu bash (D)</p> Signup and view all the answers

Which command is used to remove all unused volumes in Docker?

<p>docker volume ls -qf dangling=true | xargs -r docker volume rm (C)</p> Signup and view all the answers

In Docker, what does the command 'docker ps -aq' do?

<p>Lists all containers, including stopped ones (A)</p> Signup and view all the answers

What is the purpose of the shebang '#!/bin/bash' at the beginning of a script?

<p>To inform the operating system about the interpreter to use (D)</p> Signup and view all the answers

What does the command 'docker images --no-trunc' display?

<p>Full details of all Docker images (D)</p> Signup and view all the answers

Study Notes

Containerization vs Virtualization

  • Containers are created from images and can be stopped, restarted, or transferred to another machine.
  • Containers are isolated groups of processes managed by a shared kernel.

Dockers

  • Docker is written in Go and is a client-server application.
  • The Docker engine is a client-server application, with the CLI client (docker) communicating with the server (dockerd) through a REST API.
  • Docker allows emulation of a distributed system of servers and orchestration of multiple daemons with their respective containers as a service.

Virtualization

  • Virtualization is a technique that allows running multiple operating systems on a single computer simultaneously.
  • Virtual Machines (VMs) are simulated operating systems that run on a host computer's hardware resources.
  • Hypervisors create and execute VMs, allocating host resources to guest machines.

Benefits of Virtualization

  • Reduces downtime by executing multiple OS/applications simultaneously on the same machine.
  • Facilitates management, faster provisioning, and improves scalability, versatility, and resiliency.
  • Allows running software/peripheral that cannot run on host hardware, and enables testing in a controlled environment.

Drawbacks of Virtualization

  • Increases complexity, and the abstraction layer affects performance, consuming resources.

Paravirtualization

  • Paravirtualization is a type of virtualization where the hypervisor (type 1) runs directly on host hardware, offering performance close to real hardware.
  • Guest OS must be adapted for paravirtualization.

Docker Commands

  • docker run -it --name mon-linux-shell ubuntu bash creates a new container from an image.
  • docker exec -it mon-linux-shell sh runs a new command in an existing container.

Cleaning Up Docker Resources

  • docker ps -aq | xargs -r docker rm -f removes all containers.
  • docker images --no-trunc | awk '{ print $3 }' | xargs -r docker rmi removes unused images.
  • docker volume ls -qf dangling=true | xargs -r docker volume rm removes unused volumes.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

slides-docker-en.pdf

Description

Test your knowledge on containers, processes, and virtual machines. Learn about the differences between processes, containers, and virtual machines in terms of isolation, resource management, and boot time.

More Like This

Composite Bottles Quiz
12 questions

Composite Bottles Quiz

AdmirableVision avatar
AdmirableVision
Use Quizgecko on...
Browser
Browser