Test Flashcards

1
Q

What is Virtualization in cloud computing?

A

An ability to run multiple (Virtual) OSes on a single physical system and share underlying HW resources

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

What are the Benefits of virtualization?

A

Run multiple/different OSes on a single machine
2. Consolidate underutilized servers to reduce CAPEX and
OPEX
3. Simplified management (rebalancing workloads)
4. Improved availability
5. Enforced security

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

What is a Hypervisor?

A

A virtual machine monitor creates and runs virtual machines

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

What is a Virtual Machine?

A

The virtualization or emulation of a computer system

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

What is Full Virualization?

A

A full virtualization of a computer

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

What is Paravirtualization?

A

Hypervisor enables virtual machine that are similar but not 100% identical to physical HW

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

What is OS-Level Virtualization?

A

An operating system virtualization paradigm in which the kernel allows the existence of multiple isolated user space instances, called containers, zones, virtual private servers, partitions, virtual environments, virtual kernels, or jails.

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

What is Application-Level Virtualization?

A

Abstracting an app from the underlying hardware it is running on

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

What are the Key Techniques in Full Virtualization?

A

Trap and Emulate
Binary Translation

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

What is Trap and Emulate?

A

Running a VM in two states, a User State and Kernel state, when a privileged instruction occurs there is a switch between the user state and kernel state by the hypervisor

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

What is the 4 steps in trap and emulate?

A

1 Privileged Instruction in user mode causes an error
2 Hypervisor gains control, executes operation as attempted by guest OS
3 Return control to guest OS in user mode
4 Call this Trap and emulate

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

Does trap and emulate has the same speed of execution with full virtualization?

A

No

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

What is a critical instruction?

A

A sensitive but non-privileged instruction

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

What is sensitive instruction?

A

Instructions that interact with hardware

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

What is non-sensitive instructions?

A

All other instructions

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

What is an example of a critical instruction?

A

File Writing

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

What is the purpose of Binary Translation?

A

To skip or modify the guest OS binary code blocks which include critical instructions and translate those critical instructions into privileged instructions which will be trapped by the Hypervisor for further emulation

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

What is Para-Virulization?

A

Similar the to Virtualization but it enables virtual machine that are similar but not 100% identical to physical HW

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

Does Para-Virtualization require OS modification?

A

Yes

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

Does Para-Virtualization require modification to the ABI?

A

No

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

What are the Pros of Full Virulization?

A

No Source Code Modification
Easy

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

What are the Cons of Full Virtulization?

A

Latency from OS/HW emulation
Hard to provide real-time guarantee
Latency to RAM (25%-75%) DISKIO (2%-20%) NETIO (10%) and CPU (7%)

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

What are the Pros of Para-virtualization?

A

Performance, Fast, Feasible for All CPU Architectures

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

What are the Cons of Para-virtualization?

A

OS Modification
Poor Portability
Precludes off the self OS and legacy version of OS

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

What is PUE?

A

1 + Non IT Equipment Power/ IT Equipment Power

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

What is VM migration?

A

The transfer of one VM from one machine to another

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

What are the three use cases of VM Migration?

A

Load Balancing
Maintenance
Fault Tolerance

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

What are the two types of migrations?

A

Cold Migration and Live Migration

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

How does Pre-Copy Live Migration take place?

A

1 Select target host for migration
2 Initialize a VM on the target host
Iterative Step Copy update memory from VM on host A to host B
3 Suspend VM on host A, Sync all remaining VM states to host B
4 Release VM from host A
5 Start VM on host b

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

How does Post-Copy Live Migration take place?

A

1 Activate VM on host A and B
2 Suspend VM on host A
3 Transfer VM state to target
4 Resume VM on host B
5 Copy memory Pages from A to B

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

What are the Pros of Pre-Copy live migration?

A

Shorter Downtime
High Performance after
migration

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

What are the Cons of Pre-Copy live migration?

A

Longer Migration Time
Network Utilization

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

What are the Pros of Post-Copy live migration?

A

Shorter Migration Time
Network Utilization

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

What are the Cons of Post-Copy live migration?

A

Longer Downtime (but still Live)
Overhead after migration

35
Q

OS-Level Virtualization vs. IaaS

A

OS Level Virtualization is lighter than IAAS

36
Q

OS-Level Virtualization vs. PaaS

A

OS Level Virtualization doesn’t have to worry about supported frameworks or supported languages

37
Q

What are the Cons of OS-Level Virtualization?

A

“Technically” doesn’t have OS
- Generally runs “the same OS” as the
host machine (i.e., you cannot run
“Windows on Linux” via OS-level
virtualization)

38
Q

What are the Pros of OS-Level Virtualization?

A

Lightweight (fast creation, fast
destruction, little overhead switching between instances)
no HW emulation
Good Isolation (security, resource usage)

39
Q

What is a Namespace?

A

A limits to what processes/containers
can see through the form of an ID

40
Q

What are the six namespaces?

A

PID namespace
NET namespace
MNT namespace
IPC namespace
UTS namespace
User namespace

41
Q

What is the point of Linux Namespaces?

A

To provide processes with their own view of the system

42
Q

What is a PID namespace?

A

Processes within a PID namespace only see processes in the same PID namespace

43
Q

What is a NET namespace?

A

A NET namespace isolates networking related resources

44
Q

What is a MNT namespace?

A

A mount namespace for limiting filesystems

45
Q

What is an IPC namespace?

A

A IPC namespace isolates the inter-process communication resource

46
Q

What is a control group? (cgroups)

A

A limit to what and how much processes or containers can use

47
Q

What are the characteristics of Cgroups

A

Subsystem Hierarchy
Hierarchies are independent
Processes belong to exactly 1 node in each hierarchy
Each hierarchy starts with 1 node
Each node == group of processes

48
Q

What are some subsystems limited by cgroups?

A

CPU
Memory
Block IO
Network (TC/iptables)
Devices (/dev/*)

49
Q

What are Docker Internals?

A

Written in Go
Uses cgroups and namespaces
has a libcontainer
composed of containerd, containerd-shim, runcC

50
Q

What is the Docker Client?

A

The client section of docker

51
Q

What is the Docker Daemon?

A

The server section of docker

52
Q

What is the Docker Hub?

A

Public docker image registry

53
Q

What is docker?

A

A software platform that allows you to build, test, and deploy apps with OS-level virtualization

54
Q

What is Docker’s Architecture?

A

Client Server Architecture, Client talks to daemon which builds, runs and distributes docker containers

55
Q

What is a Docker Image?

A

A collection of files and meta data

56
Q

What is the difference between Docker Container vs Docker Image?

A

Docker container is a running version of an image

57
Q

Which would be pushed to Docker Hub? Container or Image?

A

Image

58
Q

How can Docker Images be built?

A

From a dockerfile and a context (a set of files)

59
Q

What is immutable infrastructure?

A

When a service (e.g., app, bin, others) is updated, OS or
execution environment does not have to be changed
Build a new image and deploy it to servers!

60
Q

What are the pros of Immutable Infrastructure?

A

Less management effort for
service/servers
Need to manage images
Horizontal Scalability
Run multiple servers with a
single image
Easy integration with
autoscaling

61
Q

What are the cons of Immutable Infrastructures?

A

Small quick fixes require a full
redeploy.

62
Q

Docker run

A

Runs a docker image

63
Q

docker ps

A

Shows all docker containers running

64
Q

docker stop

A

Suspends a docker containter

65
Q

What command to stop all containers?

A

docker stop $(docker ps -q)

66
Q

docker rm

A

Removes a docker container

67
Q

What command to remove all containers

A

docker stop $(docker ps -q)

68
Q

docker images

A

Displays all images currently installed on your machine

69
Q

docker pull

A

pull an image from registry

70
Q

docker rmi

A

Remove one or more images

71
Q

docker logs

A

Fetch the logs of a container

72
Q

docker exec

A

Doesn’t create a new container but sends commands to an existing container

73
Q

docker compose

A

creates and starts all
the services from your configuration file

74
Q

What is a monolithic application?

A

An app contained in one codebase and database

75
Q

What are the characteristics of monolithic applications?

A

Large codebase + Large DB
Put every function/logic into a single host (or VM)
Many components, no clear ownership
Long deployment/delivery cycle

76
Q

What are the three design principles of microservices?

A

Modularity and Independent
Hide Implementation Details
Automation

77
Q

What are the Pros of Microservices?

A

Polyglot Architecture
Language and Platform
Freedom
Evolutionary Design
Replaceable Architecture
Selective Scalability
Small, Simple, Lightweight

78
Q

What are the Cons of Microservices?

A

High Overall Complexity
(aka Deathstar…)
Overhead
Operation
Service Discovery
Communication
(Chattiness)
Could be slow
HTTP is slower than
external function call
Diversity in Language,
Platform, DB

79
Q

What are the Pros and Cons of Bare Metal Virtualization?

A

Pros: Performance, No additional SW layers, Security, No possible attack from hosted OS
Cons: Complex

80
Q

What are the Pros and Cons of Hosted Virtualization?

A

Pros: Easy to use, Hosted OS takes care of all hardware
Cons: Single point of failure, What if base OS needs a reboot

81
Q

clone()

A

creates a new process and a new namespace; the process is attached to the new namespace

82
Q

unshare()

A

Attaches the calling process to a new namespace

83
Q

setns()

A

Allows the calling process to join an existing namespace