L3 - Virtualization 1/2 Flashcards
VMM
Virtual Machine Manager (VMM) = hypervisor =
a type of software that allows multiple virtual machines (VMs) to run on a single physical machine. It creates a layer of abstraction between the physical hardware and the virtual machines, allowing multiple operating systems to run on the same physical hardware. Hypervisors are also referred to as virtual machine managers (VMM) or simply virtualizers.
What is virtualization?
Computer architecture technology by which multiple VMs are multiplexed in the same hardware.
3 objectives of virtualization
- enhance the resource sharing by many users simultaneously
- replace and upgrade hardware on the fly
- reduce downtime
Two modes of operating systems
kernel mode and user mode
What is the kernel mode?
- OS allows all CPU instructions to execute on the underlying hardware
- Kernel mode does not execute in the user mode
- Kernel processes run in the kernel mode with the superuser privilege
What is the user mode?
- OS allows only a few instructions to be executed
- if the user applications have to execute the privileged instructions then the applications ask kernels to do the work
- user applications can’t open files, send network packets, print to screen
Two distinct areas of memory
- user space
- kernel space
What is the user space?
- Set of locations where normal user processes run (everything other than the kernel)
- memory area where application software and some drivers execute
What is the kernel space?
- location where the code of the kernel is stored and executes under
- restricted for running privileged OS kernel
How many rings are there and which one is the most privileged ring?
There are rings 0,1,2,3 and ring 0 is the most privileged ring
What are the 4 rings?
Ring 0: kernel mode
Ring 1: Hypervisor
Ring 2: drivers
Ring 3: applications
What is Ring 2 in detail? (internet)
Drivers in ring 2 are typically used for managing peripheral devices such as disk drives, network interfaces, and other hardware. These drivers are responsible for communicating with the hardware, managing the data transfer between the hardware and the operating system, and providing a standard interface for applications to access the hardware.
What are the 4 processes that the OS does?
- process management (start, run, stop)
- memory management (allocate, deallocate)
- file management (open, close, modify, read, rename, create)
- network management (scheduling, timing)
What is a system call?
In user mode, the user applications initiate a system call to get OS-related services. The system call is a user space request of a kernel service.
Is a system call more expensive than a normal instruction?
Yes. It takes around 242 cycles.
What is a machine cycle?
Consists of the steps that a computer’s processor executes whenever it receives a machine language instruction.
3 types of virtualization
- Full-Virtualization (Software Assisted; Hardware Assisted: Type 1, Type 2)
- Para-Virtualization
- OS-level Virtualization
Software Assisted Full Virtualization
Software-assisted full virtualization uses binary translation when trapping and virtualizing the execution of instruction sets. The binary translation also emulates the hardware by utilizing software instruction sets.
Hardware-Assisted Full Virtualization
Hardware-assisted virtualization eliminates the need for binary translation. Privileged instructions can be executed directly on the processor.
Type 1 Hypervisor – also known as the bare-metal hypervisor type
Type 2 Hypervisor – also known as the hosted hypervisor type
What is a bare-metal hypervisor?
Type 1 Hypervisor
When a hypervisor is installed directly on the hardware of a physical machine, between the hardware and the operating system (OS).
Examples of bare-metal hypervisors
Hyper-v, VMware ESX/ESXi, Xen
Advantages of bare-metal hypervisors
Since there is no software of the operating system between the two, Type 1 can provide excellent stability and performance.
https://goabacus.com/three-types-of-server-virtualization-explained/#:~:text=This%20type%20of%20full%20virtualization,physical%20server%20and%20its%20hardware.
Challenges of bare-metal hypervisors?
- Isolation at the cost of size of the VM
- large VM of (800mb) –> challenge for scalability & migration, which is slower
What is hosted virtualization?
Type 2 Hypervisor
On top of host OS. Guest OS runs on VMM.