Virtual Machines vs. Containers
49 Questions
13 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

Which security feature is integrated into Android to ensure the integrity of the operating system?

  • Seccomp
  • SELinux
  • eBPF
  • Verified Boot (correct)
  • Linux requires automated sandboxing for all applications.

    False

    What is the primary difference between Linux and Android in terms of sandboxing?

    Linux requires manual configuration while Android has automated sandboxing built into the ecosystem.

    Android uses __________ to enforce mandatory app confinement.

    <p>SELinux</p> Signup and view all the answers

    Match the following Linux security features with their descriptions:

    <p>SELinux = Mandatory Access Control Seccomp = Filters system calls eBPF = Fine-grained monitoring Containers = Robust app isolation</p> Signup and view all the answers

    What is the primary advantage of using virtual machines?

    <p>They allow multiple applications to run on a single server.</p> Signup and view all the answers

    Containers contain their own operating systems, just like virtual machines.

    <p>False</p> Signup and view all the answers

    What is a hypervisor?

    <p>A hypervisor is software that allows one machine to run multiple virtual machines by managing hardware resources.</p> Signup and view all the answers

    Containers require a ______ to run, which is an environment specific to its content.

    <p>similar operating system</p> Signup and view all the answers

    Match the following technologies with their characteristics:

    <p>Virtual Machines = Heavyweight and slower to boot Containers = Lightweight and faster to boot Hypervisor = Manages multiple VMs Docker = Popular containerization platform</p> Signup and view all the answers

    Which of the following is NOT a disadvantage of virtual machines?

    <p>Must be packaged for specific operating systems</p> Signup and view all the answers

    Both virtual machines and containers can run on any operating system without restrictions.

    <p>False</p> Signup and view all the answers

    List one advantage of using containers over virtual machines.

    <p>Containers are faster to start up than virtual machines.</p> Signup and view all the answers

    A ______ is responsible for unpacking container files and passing them to the operating system kernel.

    <p>container engine</p> Signup and view all the answers

    Match the file permission commands with their functions:

    <p>chmod = Changes file permissions chown = Changes file ownership ls = Lists files in a directory mkdir = Creates a new directory</p> Signup and view all the answers

    What does the 'D' in the file permission string (e.g., drwxr-xr-x) indicate?

    <p>It is a directory.</p> Signup and view all the answers

    When a server's underlying operating system crashes, only the virtual machines on that server go down.

    <p>False</p> Signup and view all the answers

    What does 'rwx' signify in the permissions of a directory?

    <p>Read, write, and execute permissions for the owner.</p> Signup and view all the answers

    The sum of read (4), write (2), and execute (1) permissions gives a value of ______.

    <p>7</p> Signup and view all the answers

    What problem does virtual memory primarily solve?

    <p>Insufficient RAM</p> Signup and view all the answers

    Each program shares the same memory space in a virtual memory system.

    <p>False</p> Signup and view all the answers

    What is the term for the additional memory that can be accessed when RAM is insufficient?

    <p>Swap memory</p> Signup and view all the answers

    When a program tries to access data that is not currently in RAM, this situation is known as a __________.

    <p>page fault</p> Signup and view all the answers

    Match the following key concepts with their definitions:

    <p>Virtual Memory = Memory assigned to programs that doesn't overlap Page Table = Mapping of virtual addresses to physical addresses Page Fault = Exception raised when data is not in RAM Swap Memory = Disk space used as additional memory</p> Signup and view all the answers

    What does a page table entry map?

    <p>Virtual addresses to physical addresses</p> Signup and view all the answers

    The offset in virtual and physical addresses is always identical.

    <p>True</p> Signup and view all the answers

    What is the purpose of a Translation Lookaside Buffer (TLB)?

    <p>To cache translations from virtual to physical addresses</p> Signup and view all the answers

    Programs can corrupt each other's data if they access the same __________ in a shared memory space.

    <p>address</p> Signup and view all the answers

    What happens during a page fault?

    <p>The CPU raises an exception</p> Signup and view all the answers

    Having more RAM generally improves the performance of a computer during memory swapping.

    <p>True</p> Signup and view all the answers

    What is memory fragmentation?

    <p>A condition where free memory is split into small, non-contiguous blocks</p> Signup and view all the answers

    A __________ is used to classify and manage memory for each program efficiently.

    <p>page table</p> Signup and view all the answers

    Match the following terms with their corresponding definitions:

    <p>Physical Memory = The actual RAM in the computer Virtual Address = An address used by a program to access memory Dirty Page = A page that has been modified after it was loaded Least Recently Used = A page replacement strategy for memory management</p> Signup and view all the answers

    What command is used to add execute privileges for the owner and group in Linux?

    <p>chmod 774</p> Signup and view all the answers

    The default permissions for a key pair on AWS EC2 instances is set to 644.

    <p>False</p> Signup and view all the answers

    Which mechanism is used in Android for inter-process communication?

    <p>Binder</p> Signup and view all the answers

    In a typical directory, the baseline permission can be set to _____ for the owner, group, and others.

    <p>755</p> Signup and view all the answers

    Match the Linux commands with their respective functions:

    <p>chmod = Change file permissions chroot = Change root directory seccomp = Restrict system calls iptables = Manage network traffic rules</p> Signup and view all the answers

    Which of the following best describes a key difference between Linux and Android sandboxing?

    <p>Android apps run in isolated environments with unique UIDs.</p> Signup and view all the answers

    Linux uses a mandatory permission model for applications.

    <p>False</p> Signup and view all the answers

    What is the primary purpose of cgroups in Linux sandboxing?

    <p>Limit and monitor resource usage</p> Signup and view all the answers

    In Linux, the permission mode _____ lets the owner read and write, while the group can read only.

    <p>640</p> Signup and view all the answers

    Match the following sandboxing features to their purposes:

    <p>SELinux = Mandatory access controls Namespaces = Isolate resources AppArmor = Security profiles IPCs = Inter-app communication</p> Signup and view all the answers

    What does the 'chmod 664' command do?

    <p>Adds read and write for owner and group, but read only for others</p> Signup and view all the answers

    Android's permission model allows users to revoke permissions at runtime.

    <p>True</p> Signup and view all the answers

    What is the base permission level for files in Linux commonly used for regular files?

    <p>644</p> Signup and view all the answers

    Applications in Android have their own unique _____ assigned at install time for sandboxing.

    <p>UID and GID</p> Signup and view all the answers

    Which security feature in Android helps prevent privilege escalation attacks?

    <p>SELinux</p> Signup and view all the answers

    Network isolation in Linux can be achieved through network namespaces.

    <p>True</p> Signup and view all the answers

    Study Notes

    Virtual Machines vs. Containers

    • Traditional server application setup involved one application per server, often underutilizing server power.
    • Virtual machines (VMs) simulate multiple servers on a single physical machine using a hypervisor allocating hardware resources.
    • Hypervisors include VMware ESXi, Citrix Zen Server, and Microsoft Hyper-V.
    • VMs have drawbacks: large disk space usage due to dedicated OSes, high RAM and CPU consumption, slow startup times, and OS licensing costs.
    • Containers package application code with all needed files, configurations, and dependencies.
    • This allows easy distribution and runs without extra software/configurations.
    • Docker is primarily used to manage containers.
    • Containers share the server's underlying OS, making them lightweight, fast, and portable.
    • Container images must be compatible with the server's OS.
    • Container failure will affect all containers sharing the OS, whereas VM failure affects only the single VM.

    Linux File Permissions

    • All Linux files/directories have owner, group, and others permission levels.
    • Each level has read (r), write (w), and execute (x) permissions.
    • The "l" flag in the ls command shows detailed permissions:
      • "d" indicates a directory.
      • "rwx" permissions for owner, group, and others.
      • Dashes represent missing permissions.
    • chown command changes file/directory owners and groups (e.g., sudo chown <new_owner>:<new_group> <filename>).
    • chmod command changes file/directory permissions using a numerical system (e.g., chmod <number> <filename>).
      • Example: chmod 774 <filename> (owner: rwx, group: rwx, others: r-x)

    Linux Sandboxing and Android Sandboxing

    • Both mechanisms isolate and protect applications.
    • Linux sandboxing uses namespaces, cgroups, SELinux, AppArmor to isolate processes.
    • Android leverages Linux features, adding layers of abstraction for mobile app security and efficiency.
    • Android's app isolation uses unique UIDs/GIDs, file access restrictions, and IPC mechanisms.
    • Android's declarative permission model requires user consent and runtime permission management.
    • Key Security Differences: Linux sandboxing customization is manual, while Android is automated and integrated into the platform.
    • Android focuses on user privacy and malware prevention utilizing SELinux, Google Play Protect, etc.

    Virtual Memory

    • Virtual memory solves problems with insufficient RAM, memory fragmentation, and data security.
    • Older computers often had limited RAM and the presence of multiple applications frequently causing issues.
    • Memory fragmentation occurs when free memory is not contiguous.
    • Security issues exist if programs have access to the same memory space.
    • Virtual memory gives each program a unique address space, preventing overlaps and crashes.
    • It maps virtual addresses (program's view) to physical addresses (RAM).
    • Paging divides memory into fixed-size pages, making memory use efficient.
    • The OS uses a page table for virtual-to-physical address translation.
    • A translation lookaside buffer (TLB) is a cache to speed up translations.
    • Page faults occur when a page is not in memory (RAM), and the OS moves a page from RAM to disk or vice-versa.
    • Memory management units (MMUs) handle address translations and page faults.
    • Multi-level page tables address the challenge of running many programs simultaneously, by keeping the first-level table in RAM, and potentially swapping the second level tables to disk to preserve space.

    Studying That Suits You

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

    Quiz Team

    Description

    Explore the differences between virtual machines and containers in server application setups. This quiz covers topics such as hypervisors, resource allocation, and the benefits of using Docker for container management. Understand the technical aspects that make containers lightweight and portable compared to traditional VMs.

    More Like This

    Virtual Machines
    3 questions

    Virtual Machines

    ArticulateCarnelian8522 avatar
    ArticulateCarnelian8522
    03 - VMs vs. Containers
    18 questions

    03 - VMs vs. Containers

    EntrancedDobro6607 avatar
    EntrancedDobro6607
    Use Quizgecko on...
    Browser
    Browser