Podcast
Questions and Answers
What occurs when the guest operating system attempts to update the page table for a guest process?
What occurs when the guest operating system attempts to update the page table for a guest process?
What does the VMM do after intercepting the write from the guest operating system?
What does the VMM do after intercepting the write from the guest operating system?
What is the role of the translation lookup table (TLB) in the address translation process?
What is the role of the translation lookup table (TLB) in the address translation process?
In the nested paging architecture, what is the first step when a guest process attempts to access a memory page?
In the nested paging architecture, what is the first step when a guest process attempts to access a memory page?
Signup and view all the answers
What is the relationship between the shadow page table and the guest's page table during a write operation?
What is the relationship between the shadow page table and the guest's page table during a write operation?
Signup and view all the answers
What is the significance of the gCR3 in memory management?
What is the significance of the gCR3 in memory management?
Signup and view all the answers
Which of the following correctly describes the purpose of the gPML4E?
Which of the following correctly describes the purpose of the gPML4E?
Signup and view all the answers
How many bits are allocated for the PML4 Offset in the given structure?
How many bits are allocated for the PML4 Offset in the given structure?
Signup and view all the answers
What does the gPTE represent in this memory structure?
What does the gPTE represent in this memory structure?
Signup and view all the answers
What does the nested walk process facilitate?
What does the nested walk process facilitate?
Signup and view all the answers
What is the maximum depth of the nested walk depicted in the memory mapping?
What is the maximum depth of the nested walk depicted in the memory mapping?
Signup and view all the answers
What does the term 'gData' represent in the context of memory pages?
What does the term 'gData' represent in the context of memory pages?
Signup and view all the answers
Which offset is responsible for addressing physical page offsets?
Which offset is responsible for addressing physical page offsets?
Signup and view all the answers
What is the primary goal of virtualization technology?
What is the primary goal of virtualization technology?
Signup and view all the answers
Which of the following statements about virtualized entities is true?
Which of the following statements about virtualized entities is true?
Signup and view all the answers
What is a significant advantage of server consolidation via virtualization?
What is a significant advantage of server consolidation via virtualization?
Signup and view all the answers
Which of the following can be virtualized according to the concepts discussed?
Which of the following can be virtualized according to the concepts discussed?
Signup and view all the answers
What issue from the mid-1960s prompted the development of virtualization?
What issue from the mid-1960s prompted the development of virtualization?
Signup and view all the answers
Why was virtualization considered crucial in the context of server utilization?
Why was virtualization considered crucial in the context of server utilization?
Signup and view all the answers
Which of the following is NOT a characteristic of virtualization?
Which of the following is NOT a characteristic of virtualization?
Signup and view all the answers
What mainly drives the need for virtualization in modern computing?
What mainly drives the need for virtualization in modern computing?
Signup and view all the answers
What is a significant advantage of representing identical memory regions in different VMs?
What is a significant advantage of representing identical memory regions in different VMs?
Signup and view all the answers
What is one challenge associated with comparing memory pages across virtual machines?
What is one challenge associated with comparing memory pages across virtual machines?
Signup and view all the answers
What memory strategy does ballooning utilize to manage VM memory?
What memory strategy does ballooning utilize to manage VM memory?
Signup and view all the answers
Why is it necessary for a guest operating system to have sufficient swap space?
Why is it necessary for a guest operating system to have sufficient swap space?
Signup and view all the answers
What percentage of memory savings is indicated as possible through efficient memory management techniques?
What percentage of memory savings is indicated as possible through efficient memory management techniques?
Signup and view all the answers
What aspect of memory management does ballooning specifically address?
What aspect of memory management does ballooning specifically address?
Signup and view all the answers
How often must the comparison of memory pages in virtual machines be repeated according to the content?
How often must the comparison of memory pages in virtual machines be repeated according to the content?
Signup and view all the answers
What is one characteristic of the driver utilized in the ballooning technique?
What is one characteristic of the driver utilized in the ballooning technique?
Signup and view all the answers
What is the primary function of a subsystem in Windows NT kernel?
What is the primary function of a subsystem in Windows NT kernel?
Signup and view all the answers
Which feature is NOT supported by WSL 1?
Which feature is NOT supported by WSL 1?
Signup and view all the answers
What underlies the performance issues observed in WSL 1?
What underlies the performance issues observed in WSL 1?
Signup and view all the answers
What major engineering task was never completed for WSL 1?
What major engineering task was never completed for WSL 1?
Signup and view all the answers
Which of the following allows Windows host to access Linux guest services?
Which of the following allows Windows host to access Linux guest services?
Signup and view all the answers
Which of the following represents a potential reason to abandon WSL 1?
Which of the following represents a potential reason to abandon WSL 1?
Signup and view all the answers
What is the primary operational limitation of WSL 1?
What is the primary operational limitation of WSL 1?
Signup and view all the answers
What unique feature does WSL 1 have regarding the interaction between Windows and Linux programs?
What unique feature does WSL 1 have regarding the interaction between Windows and Linux programs?
Signup and view all the answers
What is the main role of binding a volume in Docker?
What is the main role of binding a volume in Docker?
Signup and view all the answers
Why are containers considered less secure than full virtualization?
Why are containers considered less secure than full virtualization?
Signup and view all the answers
What is a potential attack method for escaping a privileged Docker container?
What is a potential attack method for escaping a privileged Docker container?
Signup and view all the answers
In the example provided, what is the significance of the UID and GID being 1000?
In the example provided, what is the significance of the UID and GID being 1000?
Signup and view all the answers
What can be implied about the security practices when using privileged containers?
What can be implied about the security practices when using privileged containers?
Signup and view all the answers
Study Notes
Virtualization, Cloud, and Storage
- The presentation is about virtualization, cloud computing, and storage.
- It covers the history and concepts of virtualization, including full x86 virtualization and operating system virtualization.
- It also includes real-world examples and exam reading instructions.
- A quote from David Wheeler in 2004 states that "All problems in computer science can be solved by another level of indirection."
- Another quote by Kevlin Henney emphasizes that "…except for the problem of too many layers of indirection."
Quotations Fitting Virtualization
- A quote from Laadan and Nieh (2010) states that "Virtualization essentially introduces a level of indirection to a system to decouple applications from the underlying host system."
- A quote from Theo de Raadt about virtualization discusses the x86 virtualization as placing another nearly full kernel on top of a nasty x86 architecture with limited page protection.
- It highlights the complex nature of writing security-sound virtualization layers when developers are not proficient in creating secure operating systems or applications.
History
- Early computers only allowed one program and one user at a time.
- Programs were hand-crafted for slow and costly hardware.
- Users were present for real-time program diagnostics, impacting program duration.
- Computer capabilities increased in speed and capacity with declining per-computing unit costs.
- This led to improved machine utilization, where portions of the machine could be dedicated to assisting machine operation, forming the operating system.
- By the mid-1960s, research focused on running multiple programs and users simultaneously.
A Short and Biased History
- Early computers supported only a single user and program.
- Increasing computer capabilities led to dedicated portions for the operating system.
- The research question during the mid-1960s was how to enable multiple programs and users to utilize a computer concurrently.
Concepts
- Virtualization recreates a real-world entity, acting like the original but not physically existing.
- Whole computers, main memory, instruction sets (e.g., Java, CLR, Python bytecode), and storage (SAN) can be virtualized.
Why Computer Virtualization
- Server consolidation: reduces costs by combining multiple servers into a single physical machine, achieving cost-savings and increasing efficiencies in reducing hardware, energy consumption, and space.
- Flexibility: move server instances between physical machines aiding in load balancing for optimised resource utilization.
- Reliability and availability: efficient utilization of resources with dedicated virtual servers to improve reliability and availability of services.
- Testing and debugging software in a controlled environment to improve security and usability of software products.
Popek and Goldberg (1974)
- Virtual Machine (VM) is an isolated duplicate of the real machine.
- A Virtual Machine Monitor (VMM) is a software realizing VMs indistinguishable to real hardware execution (with some timing and resource limitations.)
- VMM should interfere minimally.
- VMM controls all system resources without VM approval.
- VMM can preempt allocated resources of VMs
Categorizing Virtualization
- Type-1 (native/bare metal): VMM resides directly on hardware, handling hardware access, and resource allocation. VMware ESXi is an example.
- Type-2 (hosted): VMM runs on top of an existing operating system. Examples include VMware Workstation, VirtualBox, and KVM.
Levels of Virtualization
- Full Virtualization: Guests don't realize they are virtualized, perform instructions on real hardware and the hypervisor controls access to hardware. An example of full virtualization is VMware ESXi.
- Para-Virtualization: Guest kernel can directly access virtualization monitor functions via hypercalls, more efficient, but needs hardware support and customization to specific operating systems
- Operating System Virtualization: Same kernel instance is utilized by the host and guest operating systems (like containers). Examples include OpenVZ, BSD Jails, and Docker.
- Application-level Virtualization: VMs function as normal processes on the host system. This approach provides the most efficiency but requires translation to host conventions. These include examples of Java's VM, .NET CLR, and FX!32.
- Emulation: The hypervisor completely emulates the hardware, including the CPU. The guest runs inside the emulated environment. Examples include DOSBox and Bochs.
Full x86 Virtualization
- The x86 architecture has numerous instructions, depending on the specific manufacturer and model.
- Certain CPU instructions are designated as privileged, and only code in ring 0 is permitted to execute these instructions.
- Attempts to execute privileged instructions in ring 3 will invoke a handler/dispatcher, leading to pre-configured ring 0 execution behavior.
Rings on x86 Architectures
- Rings are a permission state defining the CPU's operational restrictions when executing instructions and restricting access to memory segments and pages. The higher ring number, the more restrictions imposed.
x86 Instructions
- The x86 architecture has a large number of machine instructions.
- Certain instructions are Privileged, as they operate at a higher level of hardware access.
- Instructions at ring 3 will cause faults if they try to execute a privileged instruction.
- The hypervisor is responsible for preventing privileged instructions from direct execution.
x86 Virtualization
- The relationship of the OS and VMM in x86 virtualization is similar to how user processes interact with an operating system.
- Hardware access requires control from the VMM.
- The VMM needs to deal with potential OS/VMM conflicts.
- Mapping to the different ring architecture needs further investigation.
- Sensitive and privileged instructions pose a challenge for virtualization, requiring interception and handling by the VMM.
Memory Management (2010s)
- Memory is divided into physical and logical pages/frames for efficient management.
- Page tables provide a mapping between virtual and physical addresses.
- Translation Lookaside Buffers (TLBs) speed up address translation.
- Context switches invalidate TLBs, requiring context-aware TLBs for efficient virtualized memory access.
Shadow Page Tables
- Shadow page tables (SPTs) map to real physical memory locations, with the original guest operating system's page tables mapping virtual addresses from the guest to SPT virtual addresses.
- The MMU uses the SPT to perform the translation.
Hardware-Assisted Page Tables
- A hardware-assisted page table is aware of the virtualization process.
- It needs two extra registers: one for the guest page table and one for the host page table.
Resource Management: Overcommitment
- Multiple VMs share a single physical machine and its resources.
- The problem is potential resource shortage when numerous VMs make requests for hardware at the same time. Optimizing memory or CPU usage to manage these situations.
Ballooning
- Ballooning is a technique used to dynamically adjust the amount of memory allocated to a VM.
- The host OS often has built-in delayed actions on reclaiming memory for better performance.
Operating System Virtualization
- Using the same kernel for multiple VMs can reduce overhead compared to full virtualization.
- No special hardware support is typically required.
- The OS must support virtualization.
The Mother of All Containers
- The chroot command changes the root directory
- Mounting file systems in a temporary directory isolates the container from the rest of the system
- The presentation includes specific command examples and use cases for scenarios such as fixing bootloaders, resetting passwords, or launching programs
- These containers make extensive use of Linux Kernel features such as NAMESPACES, CONTROL GROUPS, and CAPABILITIES.
Linux Fundamentals for Containers
- Containers leverage Linux kernel features like namespaces and control groups.
- Namespaces divide resources for better control
- Control groups (CGroups) provide tools to limit resource usage.
- Capabilities allow access control to specific kernel functionality to sandbox processes.
Docker
- Docker is a containerisation platform enabling the management of operating system containers.
- Images are filesystem archives plus metadata.
- Overlays allow multiple images to be stacked, layering functionality.
- Dockerfiles define the container's configuration.
- Docker commands are used to start/stop containers modifying the configuration.
- Containers have separate filesystems for greater isolation.
- Networking is accommodated with port forwarding capabilities.
Docker and Security
- Containers are not as secure as full virtualization.
- The large interface interacting with the host operating system makes it difficult to secure.
Criticism on Docker
- Docker daemons run constantly with root permissions.
- Resources are controlled directly but not via systemd
Podman
- An alternative to Docker, with different internal design, driven by RedHat, and easier to use rootless containers.
Containers on Windows
- Microsoft supports containers on Windows through WSL (Windows Subsystem for Linux), with Hyper-V as type-1 hypervisor.
- Windows containers (WSCs) also offer process and namespace isolation, sharing kernel resources with other containers running on the host.
Real-World Examples
- VMware ESXi, WSL 1 & 2 are relevant examples of real-world virtualization use cases.
Exam Reading
- The exam will cover all materials presented, including parts skipped during the lecture
References
- A list of resources used in the presentation.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz explores the concepts and mechanisms involved in virtual memory management, specifically within nested paging architectures. You'll evaluate the roles of guest operating systems, translation lookup tables, and page tables, along with the significance of various elements like gCR3 and gPML4E.