VL 3 Flashcards

1
Q

What is virtualization?

A

Computer architecture technology by which multiple virtual machines are multiplexed in the same hardware (access same hardware)
Creating resources in a layer abstracted from real hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Objectives of virtualization

A

Resource sharing by many users at a time
Replace and upgrade hardware in the fly
Add new devices without reboot
Reduce down time
Offer administrative tasks (installing software) at runtime
Faster provisioning of multiple machines

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Modes of operation

A

Kernel mode: OS allows all CPU instructions to execute on the underlying hardware
Kernel codes do not execute in the USER mode
User mode: OS allows only a few instructions to be executed
If user apps have to execute privileged instructions, applications ask kernels to do the work

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

System calls and CPUs

A

OS does:
Process Management, Memory Management, File Management, Network Management, Scheduling, Timing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How many cycles does system call make?

A

Around 242

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Hypervisor: Bare Metal Virtualization

A

Guest Applications Ring 3
Guest OSs Ring 1
—————
VMM Ring 0
Hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Hypervisor: Hosted Virtualization

A

Hypervisor (VMM) is loaded on top of OS.
Guest OS runs on hosted Hypervisors.
Parallels, oracle Virtualbox

Guest OS
VMM
—————
Host OS(Linux, MacOS)
Hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Implementation: Full virtualization

A

Guest OS is not modified

Guest OS Ring 1
———————
VMM Ring 0
Hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens if privileged instructions are executed in Full Virtualization?

A

They are trapped due to execution in less privileged ring.
VMM intercepts such traps and emulates instruction on the fly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Impact of system calls

A

A binary translated system call with 32-but guest OS running on ring 1 takes around 2300 cycles
Reason: CPU issues fault message for every system call. Later, they were translated and executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Impact of I/O Virtualization

A

Bigger issue compared to CPU virtualization.
CPU could be added by replacing dual core CPU to quad cores
But memory bandwidth or data path or I/O chipset could not be easily modified/upgraded in a computing machine.
All guest OS should wait for physical I/O

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Impact of memory virtualization

A

Was introduced to reduce system crash
Memory management technique: maps programs memory addresses to the underlying physical machine memory
Adv: increased security; isolation; freeing applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Mapping in memory virtualization in VM

A

Programs memory Adresses are mapped to Virtual physical memory and then to physical memory => 2-stage mapping process for any guest OS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

GuestOS machine memory access, memory virtualization

A

Cannot directly access, VMM does mapping of addresses
The page table in VMM is called shadow page table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Implementation: Para Virtualization

A

Guest OS needs to be modified at the source code level
Why not normal OS from Internet? Privileged instructions go directly to Hypervisor, because OS instructions are already translated in OS
Hypervisor provides interfaces to accommodate critical kernel operations like memory management

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why is performance good in Para Virtualization?

A

Because it avoids unnecessary trapping of critical instructions

17
Q

Purpose of Hardware-assisted virtualization

A

Quickly identify the privilege instructions and efficiently execute them
=> one more high priority level VMX Root mode for VMM
Guest OS: ring 0

18
Q

Bare metal Virtualization: pros and cons

A

Barr metal can be slower
Resources requirements are comparatively low
High scalability
Multiple VMs can share a single machine/cluster
In cloud, 1000s of VMs are required
=> hosted virtualization is better solution in terms of scalability

19
Q

Hosted virtualization- OS level. How can be built ?

A

VMM is not b top ofHost OS
Built with namespaces and cgroups

20
Q

Linux Namespaces

A

Used to limit the views
Wrap a group of resources

21
Q

Kinds of namespaces

A

PID namespace: create another set of PID from PID 1 for that specific namespace
Cgroup namespace: offers new views to root directories for processes, isolates and manages resources
Network namespace: offers new view for network resources

22
Q

Cgroups - control groups

A

Limits application to a specific set of resources
Provides mechanism for aggregating/partitioning set of tasks

23
Q

Types of cgroups

A

Memory
CPU
Devices

24
Q

Memory cgroup

A

Memory resource controller
Creates a cgroup with a limited amount of memory
Features:
Accounting: how much memory pages are utilized by a specific group of running processes ?
Limiting: soft limit: memory allotted if available
Hard limit: memory is not allotted to group if tasks

25
Q

Impact exceeding hard limit of memory cgroup

A

Kernel triggers Out of memory killer process to kill any running processes
Customize solution for handling hard limit

26
Q

Custom OOM Killer process

A
  1. All processes are stopped processing
  2. Notify user space
  3. User could kill specific processes
  4. Or, user could increase hard limit specified in cgroups
  5. When done, unfreeze the group
27
Q

Containers

A

Uses kernel features (cgroups and namespaces)
Provides environment where hardware is shared among multiple users
Lightweight VM
Less space
Can get a shell on it via SSH

Container 1 Container 2
Shared kernel of OS
OS
Machine

28
Q

Docker

A

Utilizes container technology
Easily ports containers
Replicates containers across environments

29
Q

Docker vs Virtual Machine

A

Problems with VM: size, memory, integration
Repetition of Guest OS is avoided in docker through union file system

30
Q

Docker Containers: Operations

A

Caches the layers for the first time of building them
=> fast deployment

31
Q

Docker Architecture

A

Follows client-server architecture

32
Q

Docker compose

A

Build and run multi-container docker applications

33
Q

VMWare Topology

A

Architecture to create virtual data center

34
Q

VMWare components

A

VMware ESX server
Virtual machine file system
vCenter management server
Virtual Infrastructure clients
Virtual Infrastructure web access

35
Q

Distributed Services: VMWare Vmotion

A

Enables migration of virtual machines from one host memory to another without service interruption

36
Q

Distributed Services: Storage vMotion (SVMotion)

A

Does same as vMotion but also moves storage information
Enables data center level VM migration