SW INFRASTRUCTURES
11. CLOUD COMPUTING
CLOUD COMPUTING = A coherent, large-scale, and publicly accessible collecWon of computers (servers),
storage systems, and network resources. It is available via web service calls over the Internet. Access can be
short-term, long-term, or pay-per-use. It is implemented through virtualizaWon, that is, sharing resources
among mulWple virtual machines. Access to these resources is managed by the virtual machine monitor
(VMM). performance isolaWon, security, -costs, unlimited storage capacity, reliability, device indipendence
requires costant power connecWon, -security, slow
Cloud compuWng is a model that can be implemented:
WITH virtualizaHon WITHOUT virtualizaHon
• •
HW indipendence SW connesso fortemente con l’HW
• •
+flexibility -flexibility
• OS e applicaWons handled as a single enWty
SERVER CONSOLIDATION = An IT strategy that allows mulWple applicaWons to run on fewer physical servers.
It involves creaWng virtual instances of soTware and hardware that allow mulWple workloads to share the
same physical server and automaWcally balance workloads according to limits. Servers and applicaWons are
protected against system failures. Different OS can run on the same HW, -HW needed, conWnue to use
legacy SW, HW independent applicaWons
The services offered in the cloud are described by a variety of “as-a-service” terms at different layers, the
main services are::
• Cloud applicaHon layer (Soiware-aas) = Users access the services of this layer via the web and
someWmes have to pay fees to use them. Cloud applicaWons must obviously be developed on cloud
SW environments (Gmail);
• Cloud Soiware Environment layer (Plajorm-aas) = Users must be applicaWon developers.
Providers provide developers with a programming-language-level environment with a well-defined
API (Google APP Engine). This should facilitate interacWon between the environment and the app,
acceleraWng deployment and increasing scalability;
• Cloud Soiware Infrastructure layer (Infrastructure-aaS, Data-aaS, CommunicaHon-aaS) = provides
resources at the highest levels and services are:
IaaS = computaWonal resources;
o DaaS = storage that allows users to store their data at remote disks and access them any
o Wme from any place (iCloud or Google Drive);
CaaS = communicaWon capability and network security (Voice over Internet Protocol).
o
Cloud can be of different types which are:
Private = used by a single organizaWon that sets up a virtualizaWon environment on its servers in its data
Ø centers, it gains the benefits of virtualizaWon;
Community = a single cloud managed by mulWple organizaWons that share resources that are not used
Ø by the others, share the same soTware and issues;
cloud computing infrastructure offered by a third party (such as AWS), available to the
Public =
Ø public over the Internet;
Hybric = A combinaWon of the previous types. Usually used by companies that maintain their own
Ø private cloud, but in case of load peaks, they rent resources from another type of cloud. Currently, the
only globally accepted standard is the Amazon EC2 c model, which allows you to rent VM instances to
run your soTware.:
1. Create an Amazon Machine Image (applicaWons + libraries)
2. Upload it to Amazon S3, a storage service
3. Use the Amazon EC2 web service to configure security and network access
4. Choose the OS and launch the instance
5. Monitor and control via API
12. VIRTUALIZATION
MACHINE = execuWon environment that can run a program;
What’s the difference between a physical machine and a virtual machine?
COMPUTER ARCHITECTURE = sets of instrucWons structured at different LEVELS that are:
5. Problem-oriented language level (SW)
4. Assembly language level (SW)
3. OS machine level (SW) -> there is the ABI (ApplicaWon Binary Interface) that is a set
of rules that define how programs interact with the OS, through System Calls. One
machine level can only run instrucWons that were meant for it (iOS or Android).
2. ISA level (HW) -> marks the division between HW and SW
a. User ISA: aspects of the ISA visible to the program like sum or mulWplicaWon.
When applicaWon interacts with the HW, User ISA is used;
b. System ISA: aspects visible to supervisor soTware (like the OS) that manages the
HW resources. When the OS interacts with the HW, System ISA is used.
1. Microarchitecture level (HW)
0. Digital logic level (HW)
VIRTUAL MACHINE (VM) = a logical abstracWon that provides a virtualized execuWon environment. A VM
maps virtual resources to physical ones and uses physical machine instrucWons to execute the virtual ones.
There are two types of VMs:
System VMs: the SW supports the levels 0-2 of the architecture. It provides a complete system
Ø environment that supports an OS. It provides to the OS
that runs on it the access to the underlying HW
resources.. The virtualizaWon SW is called VMM (Virtual
Machine Monitor), it provides its funcWonality either
working directly on the HW or running on another OS, it
is placed between HW and SW and emulates the ISA
seen by soTware. The applicaWons depend on guest OS;
Process VM: the SW supports the levels 0-3 of the architecture. It is able to support an individual
Ø process. The virtualizaWon SW is called RunHme Soiware and it is placed
at the ABI interface (level 3), on top of the OS/hardware combinaWon. It
emulates both user-level instrucWons and OS calls.
Summarizing: Host: the underlying
pla{orm supporWng
the system.
Guest: the SW that
runs in the VM
environment.
There are different types of virtualizaWon:
System VMs:
Ø Same ISA -> Classic-System VMs: it fits on top of an HW and the VMM can intercept guest
o OS when tries to use the HW. There can be two different OSs
on the same HW.
An example is the Hosted VMs: the virtualizing soTware is on top of an exisWng host
operaWng system.
Different ISA -> Whole-System VMs: the ISAs are different so both applicaWon and OS code
o require emulaWon and all the SW is virtualized. Usually implement
the VMM and guest SW on top of a convenWonal host OS running
on the HW. The VM must emulate the enWre HW environment. An
example is Windows running on a Apple Silicon (Arm base M1 and
M2, not x86 family).
Process VMs
Ø Same ABI -> MulHprogrammed Systems: it is formed by OS call interface + user ISA. Each
o user process is given the illusion of having a complete machine. The OS manages HW
resources to permit this.
Different ABI -> High-Level Language VMs: it translates applicaWon byte code to OS-specific
o executable and minimizes HW/OS-specific feature for pla{orm independence. An example
is the Java Virtual Machine. Java can work on every architecture for which an interpreter,
called the Java RunWme Environment (JRE), exists. There are specific implementaWons of the
JRE for a given OS.
EMULATION = soTware that allow an applicaWon (or OS) to run in an environment different from the
original one. It is required when the VMs have a different ISA or ABI from the architecture where they are
running on. An emulator reads all the bytes in the memory of the system it is going to reproduce.
Interpreter program emulates the execuWon of individual source instrucWon.
How is VirtualizaHon implemented? Given a typical layered architecture of a system, virtualizaWon is
implemented by adding layers between execuWon stack layers. Depending on where the new layer is placed,
we obtain different types of VirtualizaWons. In general, we can have an:
• Hardware-level virtualizaHon: the virtualizaWon layer is placed between HW and OS and the
interface seen by OS and applicaWon might be different from the physical one.
• ApplicaHon-level virtualizaHon: the virtualizaWon layer is placed between the OS and some
applicaWons (ex: JVM). It provides the same interface to the applicaWons. ApplicaWons run in
their environment, independently from OS.
• System-level virtualizaHon: the virtualizaWon layer provides the interface of a physical machine
to a secondary OS and a set of applicaWon running in it, allowing them to run on top of an
exisWng OS. Placed between the system’s OS and other OS. It enables several OSs to run on a
single HW.
HW-level: ApplicaWon-level: System-level:
VMs has these properHes:
- ParWWoning: execuWon of mulWple OS on a single physical machine that splits the resources;
- IsolaWon: fault tolerance, at the hardware level and resource control;
- EncapsulaWon: the enWre state of a VM can be saved in a file;
- HW-independence: all VMs sees the same virtual HW.
Virtual Machine Manager/Virtual Machine Monitor/Hypervisor = applicaWon that manages the VMs,
mediates access to the HW resources on the physical system and handles instrucWons issued by the VM.
There are different types of hypervisors:
- Type 1/ Bare-metal: takes direct control of the HW. The architecture can be:
Monolithic: the drivers run in the hypervisor. +performance
o
+isolaWon -run only on HW in which the hypervisor has drivers.
Microkernel: the drivers run in a service VM. +smaller hypervisor
o
+leverages drivers of an exisWng OS +can use 3rd party drivers.
This hypervisor can be used to provide hacks to some Oss, for example:
1. Windows 7 without an official license.
2. Mac OS on non-Apple hardware.
- Type 2/Hosted: is in the host OS and leverages its code (CPU scheduling). They have at least two
OSs running on the same HW (host controls the HW, guest runs in the VM).
The VMM runs in the Host OS, while applicaWons in the Guest OS. +flexible,
+simpler, -special care required, -host might consume a lot of resources.
System-Level (same ISA) VirtualizaHon techniques:
ParavirtualizaHon: guest OS and VMM collaborate because
§
the VMM presents to VMs an interface similar to the
underlying HW in order to allow the reducWon of the
expensive tasks executed by the guest. +simpler
+performance -modified guest OS.
Full VirtualizaHon: provides a complete simulaWon of the
§
underlying HW (ex ISA and memory access). +unmodified OS -
not on every architecture
Drawbacks of VirtualizaHon:
- performance degradaWon;
- the guest OS will have its own kernel and libraries and it consumes a lot of resources;
- it may take minutes to start;
- hypervisors are not as efficient as the host.
CONTAINERS = pre-configured packages, with everything you need to execute your code. VM provides HW
virtualizaWon, while containers provide virtualizaWon at the operaWng system level, so the main difference is
that the containers share the host kernel with other containers. ContainerizaWon over VirtualizaWon:
+containers are lighter, smaller and faster (since every modificaWon of an app requires a new virtual server),
+resource uWlizaWon +short start process +predictable, repeatable and immutable behaviour.
Docker = open source pla{orm that helps to build and run any app, anywhere. Docker is ba
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
-
Formulario completo per l'esame di Computing Infrastructure
-
Schema per l'esame di Computing Infrastructure
-
Appunti lezioni Cloud Computing
-
Appunti di "Algorithms and Parallel Computing"