Cloud: Definition and Virtualization

What services does Cloud offer?

SaaS: Software-as-a-Service

PaaS: Platform-as-a-Service

IaaS: Infrastructure-as-a-Service

Comparing service models

:::{image} ../fig/csc603/03-services/01.png :class: bg-primary mb-1 :height: 400px :align: center :::

:::{image} ../fig/csc603/03-services/02.png :class: bg-primary mb-1 :height: 400px :align: center :::

1
2
3
4
5
6
## XaaS: Everything-as-a-Service


- Composite second level services
- [NIST Evaluation of Cloud Computing Services (2018) p. 20](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.500-322.pdf)

NIST: Four deployment models

Cloud Security: who is doing what

What is virtualization?

:::{image} ../fig/csc603/04-virtualization/01.png :class: bg-primary mb-1 :height: 150px :align: center :::

:::{image} ../fig/csc603/04-virtualization/02.png :class: bg-primary mb-1 :height: 300px :align: center :::

:::{image} ../fig/csc603/04-virtualization/03.png :class: bg-primary mb-1 :height: 150px :align: center :::

:::{image} ../fig/csc603/04-virtualization/04.png :class: bg-primary mb-1 :height: 300px :align: center :::

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

## Types of virtualization

- Platform Virtualization
- Memory Virtualization
- Desktop Virtualization
- Application Virtualization
- Network Virtualization
- Storage Virtualization


- Full Virtualization
- Para Virtualization
- Hardware assisted virtualization
- OS level virtualization


- x86 offers four levels of privilege (Ring 0 through 3)
- OS needs to have access to hardware and run on ring 0
- Application runs on ring 3, gain access to hardware by trapping into kernel mode for 
privileged instructions.
- Virtualizing x86 requires a layer under OS (which already at lowest level) to create 
and manage the VM
- Sensitive instructions must be executed in ring 0 

:::{image} ../fig/csc603/04-virtualization/05.png
:class: bg-primary mb-1
:height: 300px
:align: center
:::


- Guess OS is unaware of host OS.
  - VMM provides virtual BIOS, virtual devices, and virtual memory management.
- Non-critical instructions run directly on hardware.
- Runtime translation of critical non-virtualizable instructions happens in the hypervisor.
- Provide best isolation and security at the cost of performance.

:::{image} ../fig/csc603/04-virtualization/06.png
:class: bg-primary mb-1
:height: 300px
:align: center
:::


- Thin layer interfaces between each guest OS and underlying hardware.
- Need guest kernel modification.
- No need of runtime translation for critical instructions.
- Superior in performance.
- Requires expertise to patch the kernels.

:::{image} ../fig/csc603/04-virtualization/07.png
:class: bg-primary mb-1
:height: 300px
:align: center
:::


- Hardware provides support to run instructions independently.
  - Intel Virtualization Technology (VT-x)
  - AMD Virtualization Technology (AMD-V)
- No need to patch the kernels.
- Runtime translation not required.
- Better performance in comparison to other variants.
- Greater stability
:::{image} ../fig/csc603/04-virtualization/08.png
:class: bg-primary mb-1
:height: 300px
:align: center
:::


- Same OS for both host and guest machines.
- User space is completely isolated.
- High performance.
- Extremely light-weight.



- How to share physical system memory and dynamically allocating it to virtual machines.
- Guess OS maps virtual memory space (of VM) to physical memory space (of VM).
- VMM translates physical memory space (of VM) to physical memory space (of main machine), 
but also enables direct mapping (shadow table) to avoid overhead.
:::{image} ../fig/csc603/04-virtualization/09.png
:class: bg-primary mb-1
:height: 300px
:align: center
:::



|  | Full Virtualization with Binary Translation | Hardware Assisted Virtualization | OS Assisted Virtualization/Para Virtualization |  
| ----------- | -------------- | -------------- | ------- |  
| Guest modification/Compatibility | Unmodified Guest OS, excellent compatibility | Unmodified Guest OS, excellent compatibility | Guest OS codified to run Hypercall, cannot run of native hardware or other hypervisors. Poort compatibility |  
| Performance | Good              | Fair              | Better on certain cases       |  
| Guest OS Hypervisor Independent | Yes              | Yes              | Xen Linux runs only on Xen Hypervisor. VMI-Linux is Hypervisor agnostic       |  


- Desktop and Applications run on servers.
- Stateless thin clients connected to servers.
- Efficient system management.
- Requires high-end servers for system stability

Network and storage virtualization

Virtualization: concept of overcommits

Virtualization hypervisors

Virtualization in the cloud

:::{image} ../fig/csc603/04-virtualization/10.png :class: bg-primary mb-1 :height: 300px :align: center :::

:::{image} ../fig/csc603/04-virtualization/11.png :class: bg-primary mb-1 :height: 300px :align: center :::

:::{image} ../fig/csc603/04-virtualization/12.png :class: bg-primary mb-1 :height: 500px :align: center :::

:::{image} ../fig/csc603/04-virtualization/13.png :class: bg-primary mb-1 :height: 300px :align: center :::

:::{image} ../fig/csc603/04-virtualization/14.png :class: bg-primary mb-1 :height: 300px :align: center :::

```