0% found this document useful (0 votes)
39 views

Unit 2 - Cloud Computing - Digital Content

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Unit 2 - Cloud Computing - Digital Content

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 95

1

2
Please read this disclaimer before proceeding:
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document
through email in error, please notify the system manager. This document
contains proprietary information and is intended only to the respective group /
learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender
immediately by e-mail if you have received this document by mistake and delete
this document from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.

3
CS8791
Cloud Computing
Computer Science and Engineering
2019 – 2023 / IV Year
Created by:

Dr. T. Sethukarasi, Prof & Head, RMKEC

Ms. T. Sumitha, AP/CSE, RMKEC

Ms. S. Keerthiga, AP/CSE, RMKEC

August 2022

4
Table of Contents
S.No Description Page
Number
1 Course Objectives 6

2 Pre Requisites (Course Names with Code) 7

3 Syllabus (With Subject Code, Name, LTPC 8


details)
4 Course outcomes 9

5 CO- PO/PSO Mapping 10

6 Lecture Plan 11

7 Activity based learning 13

8 Lecture Notes 15

9 Assignments 105

10 Part A Q & A 108

11 Part B Qs 120

12 Supportive online Certification courses (NPTEL, 122


Swayam, Coursera, Udemy)
13 Real time Applications in day to day life and to 124
Industry
14 Contents beyond the Syllabus 127

15 Assessment Schedule 130

16 Prescribed Text Books & Reference Books 131

17 Mini Project suggestions 133

5
COURSE OBJECTIVES

To understand the concept of cloud computing.

To appreciate the evolution of cloud from the existing

technologies.

To have knowledge on the various issues in cloud computing.

To be familiar with the lead players in cloud.

To appreciate the emergence of cloud as the next generation

computing paradigm.

6
PRE REQUISITES

CS8791

CLOUD COMPUTING
CS8591 CS8493 CS8491
Computer Operating Computer
Networks Systems Architecture

[Sem V] [Sem VI] [Sem VII]

7
SYLLABUS

CS8791 CLOUD COMPUTING LTPC


3 00 3
UNIT I INTRODUCTION
Introduction to Cloud Computing – Definition of Cloud – Evolution of
Cloud Computing – Underlying Principles of Parallel and Distributed
Computing – Cloud Characteristics – Elasticity in Cloud – On-demand
Provisioning.
UNIT II CLOUD ENABLING TECHNOLOGIES
Service Oriented Architecture – REST and Systems of Systems – Web
Services – Publish and Subscribe Model – Basics of Virtualization –
Types of Virtualization – Implementation Levels of Virtualization –
Virtualization Structures – Tools and Mechanisms – Virtualization of
CPU –Memory – I/O Devices –Virtualization Support and Disaster
Recovery.
UNIT III CLOUD ARCHITECTURE, SERVICES AND STORAGE
Layered Cloud Architecture Design – NIST Cloud Computing Reference
Architecture – Public, Private and Hybrid Clouds – laaS – PaaS – SaaS
– Architectural Design Challenges – Cloud Storage – Storage-as-a-
Service – Advantages of Cloud Storage – Cloud Storage Providers –
S3.
UNIT IV RESOURCE MANAGEMENT AND SECURITY IN CLOUD
Inter Cloud Resource Management – Resource Provisioning and
Resource Provisioning Methods – Global Exchange of Cloud Resources
– Security Overview – Cloud Security Challenges –Software-as-a-
Service Security – Security Governance – Virtual Machine Security –
IAM –Security Standards.
UNIT V CLOUD TECHNOLOGIES AND ADVANCEMENTS
Hadoop – Map Reduce – Virtual Box — Google App Engine –
Programming Environment for Google App Engine –– Open Stack –
Federation in the Cloud – Four Levels of Federation –Federated
Services and Applications – Future of Federation.

8
Course Outcomes

At the end of the course, the student should be able to:

S.No Description CO HKL

1 Describe the principles of Parallel and CO1 K2


Distributed Computing and evolution of
cloud computing from existing
technologies
2 Implement different types of Virtualization CO2 K3
technologies and Service Oriented
Architecture systems
3 Elucidate the concepts of NIST Cloud CO3 K3
Computing architecture and its design
challenges

4 Analyse the issues in Resource CO4 K3


provisioning and Security governance in
clouds

5 Choose among various cloud technologies CO5 K3


for implementing applications

6 Install and use current cloud technologies CO6 K3

*HKL - Highest Knowledge


Level
9
6. CO - PO / PSO MAPPING

PROGRAM OUTCOMES PSO


K3, P P P
CO HKL K3 K4 K5 K5 K4, A3 A2 A3 A3 A3 A3 A2 S S S
K5 O O O
PO PO PO PO PO PO PO PO PO PO PO PO 1 2 3
-1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12

C203.1 K2 2 1 - - - - - - - - - - 2 2 1

C203.2 K3 3 2 1 - 3 - - - - - - - 2 2 -

C203.3 K3 3 2 1 - 2 - - - - - - - 2 1 -

C203.4 K3 3 2 1 1 2 - - - - - - - - - -

C203.5 K3 3 2 1 1 2 - - - - - - - - - -

C203.6 K3 2 1 - - 1 - - - - - - - - - -

Correlation Level - 1. Slight (Low) 2. Moderate (Medium)


3. Substantial (High) , If there is no correlation, put “-“.

10
LECTURE PLAN

UNIT 2 CLOUD ENABLING TECHNOLOGIES

UNIT – I LINEAR DATA STRUCTURES – LIST


Actua
Propos
l Highest Re
S. ed Mode of Delivery
Topic Lectu CO Cognitive LU Outcomes mar
No Lecture Delivery Resources
re Level k
Date
Date
Define SOA and its existence
1 Service Oriented Architecture K2 MD1 & MD5 T1
in WWW
Describe the REST
2 REST Architecture K2 MD1 & MD5 T1 architecture and its wide use
in Internet.
Explain the concepts of Web
3 System of Systems K2 MD1 & MD5 T1
Services
Describe the SOAP
4 Web Services K2 MD1 & MD5 T1 architecture and its wide use
in Internet.
Explain the messaging
5 Publish Subscribe Model K2 MD1 & MD5 T1 model – Publish and
CO2 subscribe
Define Virtualization and its
6 Basics of Virtualization & Types K2 MD1 & MD5 T1 significance in Cloud
Computing
Analyse the various
7 Implementation Levels of Virtualization K3 MD1 & MD5 T1 implementation levels of
Virtualization
Apply the tools and
Virtualization Structure – Tools and
8
Mechanisms
K3 MD1 & MD5 T1 mechanism to implement
Virtualization.
Describe the concepts of
9 Virtualization of CPU, Memory and I/O K2 MD1 & MD5 T1 Virtualizing CPU, Memory
and I/O devices.
Analyse the case study of
MD1 & MD5 T1
10 Virtualization Support and Discovery K3 Virtualization in Disaster
Recovery.

ASSESMENT COMPONENTS MODE OF DELIVERY


AC 1. Unit Test MD1. Oral Presentation
AC 2. Assignment MD2. Tutorial
AC 3. Course MD3. Seminar
AC 4. Course Quiz MS4. Hands On
AC 5. Case MD5. Videos
AC 6. Record Work MD6. Field Visit
AC 7. Lab / Mini Project
AC 8. Lab Model Exam
AC 9. Project Review

11
Activity Based
Learning

12
Activity Zone
Unit – II :
Design a small Jersey application which will expose a web service method to
display list of users.
Click the below link to view the sample application.
https://www.tutorialspoint.com/restful/restful_first_application.htm

13
Class Notes

14
Unit 2 – Cloud
Enabling Technologies

15
Service Oriented Architecture
What is SOA?

SOA , or Service-Oriented Architecture, is defined as the design of a software


system that makes use of services of new or legacy applications through their
published or discoverable interfaces.

Services interact with each other using communication protocols such as REST or
SOAP( Simple Object Access Protocols).

Services are loosely coupled, meaning the service interface is independent of the
underlying implementation.

SOA is form of distributed systems architecture

Major Roles within SOA

Characteristics of SOA

Logical view

The SOA is an abstracted, logical view of actual programs, databases,


business processes, and so on, defined in terms of what it does.

Message orientation

Using the SOA discipline one does not and should not need to know how
the service provider or service requester agent implementing a service is
constructed. Services communicates simply by exchanging the message.

16
Description orientation

A service is described by machine-executable metadata. Only those details


which are required by the public to use the service are included in the description. The
semantics of the service should also be included in the description.

• Granularity Services tend to use a small number of operations with relatively


large and complex messages.

• Network orientation Services tend to be oriented toward use over a network,


though this is not an absolute requirement.

• Platform-neutral Messages are sent in a platform-neutral, standardized


format delivered through the interfaces. XML is the most obvious format that
meets this constraint.

Evolution of SOA

17
A large number of sensors provide data-collection services, denoted in the figure
as SS (sensor service).

Raw data is collected by sensor services.

All the SS devices interact with large or small computers, many forms of grids,
databases, the compute cloud, the storage cloud, the filter cloud, the discovery
cloud, and so on.

Filter services (fs in the figure) are used to eliminate unwanted raw data, in order
to respond to specific requests from the web, the grid, or web services.

A collection of filter services forms a filter cloud.

SOA aims to search for, or sort out, the useful data from the massive amounts of
raw data items.

Most distributed systems require a web interface or portal.

For raw data collected by a large number of sensors to be transformed into useful
information or knowledge, the data stream may go through a sequence of
compute, storage, filter, and discovery clouds.

Finally, the inter-service messages converge at the portal, which is accessed by


all users.

18
Elements of SOA

Application frontend: User Interface of the application.

Service: is a self-contained unit of software that performs a specific task

Contract: Agreement to access the service

Implementation: Actual implementation of the service with the logic & data

Interface: Method that is exposed to the public to access the service.

Service repository: It the place where the all the services are registered for the
consumers to locate it.

Service bus: It routes the request from the consumer to respective service.

19
Benefits of SOA

Service reusability: In SOA, applications are made from existing services. Thus,
services can be reused to make many applications.

Easy maintenance: As services are independent of each other they can be updated
and modified easily without affecting other services.

Platform independent: SOA allows making a complex application by combining


services picked from different sources, independent of the platform.

Availability: SOA facilities are easily available to anyone on request.

Reliability: SOA applications are more reliable because it is easy to debug small
services rather than huge codes

Scalability: Services can run on different servers within an environment, this


increases scalability

Disadvantages of SOA

High overhead:

A validation of input parameters of services is done whenever services interact


this decreases performance as it increases load and response time.

High investment:

A huge initial investment is required for SOA.

Complex service management:

When services interact they exchange messages to tasks. the number of


messages may go in millions. It becomes a cumbersome task to handle a large
number of messages.

Major Service Oriented Architecture Styles

1. REST (Representational State Transfer)

2. WS (Web Services)

20
REST and Systems of Systems

What is REST?
REST is a software architecture style for distributed systems, particularly distributed
hypermedia systems, such as the World Wide Web.

It is used by companies like Google, Amazon, Yahoo!, and especially social networks
such as Facebook and Twitter because of its simplicity, and its ease of being
published and consumed by clients.

A simple REST interaction between user and server in HTTP specification is given
below

Principles of REST Architecture Style

1. Resource Identification through URIs

2. Uniform, Constrained Interface

3. Self-Descriptive Message

4. Stateless Interaction

21
Principles of REST Architecture Style

1. Resource identification through URI


The RESTful web service exposes a set of resources(Document/Image) which
identify targets of interaction with its clients.

Each particular resource is identified by a unique name, or more precisely, a


Uniform Resource Identifier (URI) which is of type URL.

URI provides a global addressing space for resources involved in an


interaction between components as well as facilitating service discovery.

2. Uniform, Constrained Interface

Interaction with RESTful web services is done via the HTTP standard,
client/server cacheable protocol.

Resources are manipulated using a fixed set of four CRUD (create, read,
update, delete) verbs or operations: PUT, GET, POST, and DELETE.

PUT creates a new resource, which can then be destroyed by using DELETE.
GET retrieves the current state of a resource. POST transfers a new state
onto a resource.

3. Self-Descriptive Message

A REST message includes enough information to describe how to process the


message.

In REST, resources can be accessed in a variety of standard formats (e.g.,


HTML, XML, MIME, plain text, PDF, JPEG, JSON, etc.) because resources are
decoupled from their representation so that their content .

Metadata about the resource are used for cache control, transmission error
detection, authentication or authorization, and access control.

22
Principles of REST Architecture Style

4. Stateless Interactions
The REST interactions are “stateless” in the sense that the meaning of a
message does not depend on the state of the conversation.

Stateless communications improve visibility, since a monitoring system does


not have to look beyond a single request data field in order to determine the
full nature of the request reliability as it facilitates the task of recovering from
partial failures, and increases scalability as discarding state between requests
allows the server component to quickly free resources.

However, stateless interactions may decrease network performance by


increasing the repetitive data (per-interaction overhead).

Advantages of RESTFUL Service


REST is ais client/server: the business logic is decoupled from presentation.
RESTful service can be accessed from ordinary web browser without writing
the custom client software.

A stateless RESTful web service is scalable to serve a very large number of


clients, as a result of REST support for caching, clustering, and load
balancing.

RESTful web services can be considered an alternative to SOAP stack because


of their simplicity, lightweight nature, and integration with HTTP

With the help of URIs and hyperlinks, REST has shown that it is possible to
discover web resources without an approach based on registration to a
centralized repository.

Limitations of RESTFUL Service


There are not a variety of toolkits for developing RESTful applications

REST is not a standard. It is a design and architectural style for large-scale


distributed systems.

Also, restrictions on GET length, which does not allow encoding of more than
4 KB of data in the resource URI, can create problems because the server
would reject such malformed URIs, or may even be subject to crashes.

23
REST Architectural Elements

REST Element Elements Example


Data elements Resource The target of hypertext Reference
Resource Identifier URL
Representation HTML, JPEG, XML etc.
Representation meta data Media type, Last-modified time
Resource meta data Source link, alternates
Control meta data If-modified-since, cache-control

Connectors Client libwww, libwww-perl


Server Libwww, ApacheAPI, NSAPI
Cache Browser cache
Resolver Bind( DNS lookup library)
Tunnel SSL after HTTP Connect

Components Origin Server Apache httpd, Microsoft IIS


Gateway Squid, CGI, Reverse Proxy
Proxy CERN proxy, Netscape proxy
User agent Netscape navigator

REST API Specification(JSR-311 (JAX-RS)


It is Provided by Sun Microsystems, defines a set of Java APIs for the development of
RESTful web services.

It provides a set of annotations with associated classes and interfaces that can be
used to expose Java objects as web resources.

It provides clear mappings between the URI and corresponding resources, and
mappings between HTTP methods with the methods in Java objects, by using
annotations.

The API supports a wide range of HTTP entity content types including HTML, XML,
JSON, GIF, JPG, and so on.

24
Example of RESTful Web Service: Amazon S3 Interface

A good example is the Amazon Simple Storage Service (S3) interface.

Amazon S3 is data storage for Internet applications. It provides simple


web services to store and retrieve data from anywhere at any time via
the web.

S3 keeps fundamental entities, “objects,” which are named pieces of


data accompanied by some metadata to be stored in containers called
“buckets,” each identified by a unique key.

Amazon S3 provides three types of resources: a list of user buckets, a


particular bucket, and a particular S3 object, accessible through
https://s3.amazonaws.com/{name-of-bucket}/{name-of-object}.

The Amazon S3 API supports the ability to find buckets, objects, and
their related metadata; create new buckets; upload objects; and
delete existing buckets and objects for the aforementioned operations.

Sample for creating S3 Bucket is given below.

REST Request REST Response


HTTP/1.1 200 OKx-amz-id-2:
PUT/[bucket-name] HTTP/1.0Date: Wed, 15 VjzdTviQorQtSjcgLshzCZSzN+7CnewvHA+6s
NxR3VRcUPyO5fmSmo8bWnIS52qax-amz-
Mar 2011 14:45:15 GMTAuthorization:AWS request-id: 91A8CC60F9FC49E7 Date: Wed,
15 Mar 2010 14:45:20 GMTLocation:
[aws-access-key-id]: [header-signature] /[bucket-name]Content-Length:
0Connection: keep-alive
Host: s3.amazonaws.com

25
Web Services

“web service” is often referred to a self-contained, self-describing,


modular application designed to be used and accessible by other
software applications across the web.

Once a web service is deployed, other applications and other web


services can discover and invoke the deployed service

The W3C working group defines a web service as a software system


designed to support interoperable machine-to-machine interaction
over a network.

A web service has an interface described in a machine-executable


format (specifically Web Services Description Language or WSDL).

Other systems interact with it using SOAP messages, typically


conveyed using HTTP with an XML serialization in conjunction with
other web-related standards.

26
Web Services

Technologies used in Web Services

1. Simple Object Access Protocol (SOAP)

SOAP provides a standard packaging structure for transmission


of XML documents over various Internet protocols, such as
SMTP, HTTP, and FTP and also it provides interoperability.

A SOAP message consists of a root element called envelope,


which contains

• a header which consist of routing information,


authentication , transaction management, QOS
configuration.

• a body element that carries the payload of the message.

The content of the payload will be marshalled by the sender’s


SOAP engine and marshalled at the receiver side, based on the
XML schema that describes the structure of the SOAP message.
2. Web Services Description Language (WSDL)

It describes the interface, a set of operations supported by a


web service in a standard format.

It standardizes the representation of input and output


parameters of its operations as well as the service’s protocol
binding, the way in which the messages will be transferred on
the wire.

Using WSDL enables disparate clients to automatically


understand how to interact with a web service.

27
Web Services

Technologies used in Web Services

4. Universal Description, Discovery, and Integration (UDDI)

It provides a global registry for advertising and discovery of


web services, by searching for names, identifiers, categories, or
the specification implemented by the web service.

WS-I Protocol Stack

Unlike RESTful web services that do not cover QoS and


contractual properties, SOAP-based web services defines non functional
requirements and to guarantee a certain level of quality in message
communication as well as reliable, transactional policies, such as WS-
Security, WS-Agreement, WS-Reliable Messaging , WS-Transaction , and
WS-Coordination.

28
Web Services

SOAP messages are encoded using XML which takes the form of start and end
tags which often constitute half or more of the message’s bytes.

Business Process Execution Language for Web Services (BPEL4WS) allows for
webservice composition to create more complex webservices and workflows.

BPEL enables organizations to automate their business processes by


orchestrating services.

Since SOAP can combine the strengths of XML and HTTP, as a standard
transmission protocol for data, it is an attractive technology for heterogeneous
distributed computing environments, such as grids and clouds, to ensure
interoperability.

Sample SOAP Request-Response for Creating an S3 Bucket

SOAP Request SOAP Response


<soap:Envelope <soap:Envelope
xmlns:soap=“http://www.w3.org/2003/0 xmlns:soap=“http://www.w3.org/2003/0
5/soap-envelope” 5/soap-envelope”
soap:encodingStyle= soap:encodingStyle=
“http://www.w3.org/2001/12/soap- “http://www.w3.org/2001/12/soap-
encoding”> encoding”>
<soap:Body> <soap:Body>
<CreateBucket <CreateBucket
xmlns=“http://doc.s3.amazonaws.com/2 xmlns=“http://doc.s3.amazonaws.com/2
010-03-15”> 010-03-15”>
<Bucket>SampleBucket</Bucket> <Bucket>SampleBucket</Bucket>
<AWSAccessKeyId> <AWSAccessKeyId>1B9FVRAYCP1VJEXAM
1B9FVRAYCP1VJEXAMPLE= PLE= </AWSAccessKeyId>
</AWSAccessKeyId> <Timestamp>2010-03-15T14:40:00.165Z
<Timestamp>2010-03-15T14:40:00.165Z </Timestamp>
</Timestamp> <Signature>Iuyz3d3P0aTou39dzbqaEXAM
<Signature>Iuyz3d3P0aTou39dzbqaEXAM PLE
PLE =</Signature>
=</Signature> </CreateBucket>
</CreateBucket> </soap:Body>
</soap:Body> </soap:Envelope>
</soap:Envelope>

29
Web Services

WS-* Core SOAP Header Standards

The 10 Areas Covered by the Core WS-* Specifications are

WS-* Specification Area Examples


1. Core Service Model XML, WSDL, SOAP

2. Service Internet WS-Addressing, WS-MessageDelivery,


Reliable WSRM, Efficient MOTM
3. Notification WS-Notification, WS-Eventing (Publish-
Subscribe)
4. Workflow and Transactions BPEL, WS-Choreography, WS-
Coordination
5. Security WS-Security, WS-Trust, WS-Federation,
SAML, WS-Secure Conversation
6. Service Discovery UDDI, WS-Discovery

7. System Metadata and State WSRF, WS-Metadata Exchange, WS-


Context
8. Management WSDM, WS-Management, WS-Transfer

9. Policy and Agreements WS-Policy, WS-Agreement

10. Portals and User Interfaces WSRP (Remote Portlets)

REST Web Services vs SOAP Web Service

30
Publish/Subscribe Model
It is an asynchronous communication method in which messages are
exchanged between applications without knowing the identity of the sender or
recipient.

It describes a particular model for linking source and destination for a message
bus

Four core concepts make up the pub/sub model:

1. Topic – An intermediary channel that maintains a list of subscribers to


relay messages to that are received from publishers

2. Message – Serialized messages sent to a topic by a publisher which has no


knowledge of the subscribers

3. Publisher – The application that publishes a message to a topic

4. Subscriber – An application that registers itself with the desired topic in


order to receive the appropriate messages

Here, we find a many-to-many relationship between publishers and


subscribers.

Publish-subscribe messaging middleware allows straightforward


implementation of notification or event-based programming models.

The messages could, for example, be labeled by the desired notifying topic
(e.g., an error or completion code) and contain content elaborating the
notification

31
Advantages of Publish/Subscribe Model

The advantages are

1. Loose coupling

2. Stability

Loose Coupling:

Publishers are never aware of the existence of subscribers so that both


systems can operate independently of each other. This methodology removes service
dependencies that are present in traditional coupling. For example, a client generally
cannot send a message to a server if the server process is not running. With
pub/sub, the client is no longer concerned whether or not processes are running on
the server.

Scalability:

Pub/sub messaging can scale to volumes beyond the capability of a single


traditional data centre. This level of scalability is primarily due to parallel operations
and message caching.

Limitations of Publish/Subscribe Model

For scalability, Increasing the number of nodes and messages also increases
the chances of experiencing a load surge or slowdown.

A publisher may only deliver messages for a certain period of time regardless
of whether the message was received or not.

If the subscriber isn’t listening and misses an important message it can be


disastrous for production systems.

Example for publish Subscribe Model

1. Event notifications

2. Data streaming

32
BASICS OF VIRTUALIZATION
Virtualization refers to the creation of a virtual resource such as a server, desktop, operating
system, file, storage or network. The main goal of virtualization is to manage workloads by
radically transforming traditional computing to make it more scalable.

Virtualization is the process of creating a software-based, or virtual, representation of


something, such as virtual applications, servers, storage and networks. It is the single most
effective way to reduce IT expenses while boosting efficiency and agility for all size businesses.

Virtualization Basics

 A virtual machine is a software computer that, like a physical computer, runs an


operating system and applications. The hypervisor serves as a platform for running
virtual machines and allows for the consolidation of computing resources.
 Each virtual machine contains its own virtual, or software-based, hardware, including a
virtual CPU, memory, hard disk, and network interface card.

 Software called the hypervisor is installed on the physical hardware in a virtualized


datacenter, and acts as a platform for virtual machines.

Hypervisor or VMM

A hypervisor, also known as a virtual machine monitor or VMM, is software that creates and
runs virtual machines (VMs). A hypervisor allows one host computer to support multiple guest
VMs by virtually sharing its resources, such as memory and processing.
33
Use of Hypervisor
Hypervisors make it possible to use more of a system’s available resources and provide
greater IT mobility since the guest VMs are independent of the host hardware. This means
they can be easily moved between different servers.

A hypervisor reduces:
 Space
 Energy
 Maintenance requirements

Figure- Hypervisor/VMM structure

Tpyes of Hypervisor/VMM
1) Type-1:Bare Metal Hypervisor
2) Type-2:Hosted Hypervisor

 Type 1 hypervisor: hypervisors run directly on the system hardware – A “bare metal”
embedded hypervisor, 34
 Type 2 hypervisor: hypervisors run on a host operating system that provides virtualization
services, such as I/O device support and memory management.

Figure- Types of Hypervisor /VMM

Figure- Structural view types of Hypervisor /VMM


Benefits of hypervisors
There are several benefits to using a hypervisor that hosts multiple virtual machines:

 Speed: Hypervisors allow virtual machines to be created instantly, unlike bare-metal servers.
This makes it easier to provision resources as needed for dynamic workloads. 35
 Efficiency: Hypervisors that run several virtual machines on one physical machine’s resources
also allow for more efficient utilization of one physical server. It is more cost- and energy-
efficient to run several virtual machines on one physical machine than to run multiple
underutilized physical machines for the same task.

 Flexibility: Bare-metal hypervisors allow operating systems and their associated applications
to run on a variety of hardware types because the hypervisor separates the OS from the
underlying hardware, so the software no longer relies on specific hardware devices or drivers.
 Portability: Hypervisors allow multiple operating systems to reside on the same physical
server (host machine). Because the virtual machines that the hypervisor runs are independent
from the physical machine, they are portable.

36
Types of Virtualization

There are 8 Types of Virtualization


1.Software Virtualization
It provides the ability to run and create one or more virtual environments. It is used to enable
a complete computer system in order to allow a guest OS to run.
For instance, letting Linux run as a guest that is natively running a Microsoft Windows OS (or
vice versa, running Windows as a guest on Linux).

Types of Software Virtualization:


 Operating system Virtualization
 Application virtualization
 Service virtualization

1. a. OS Virtualization
Virtualizing an operating system environment is the most common form of virtualization. It
involves putting a second instance or multiple instances of an operating system, like Windows,
Linux, Mac OS on a single machine. This empowers businesses to reduce the amount of physical
hardware required to run their software by cutting down the number of actual machines. It
saves companies cash on energy, cabling, hardware, rack space, and more, while still allowing
them to run the same quantity of applications.

b. Application-Server Virtualization
It is often referred to as ‘advanced load balancing,’ as it spreads applications across servers,
and servers across applications. This enables IT departments to balance the workload of
specific software in an agile way that doesn’t overload a specific server or underload a specific
application in the event of a large project or change. In addition to load balancing it also allows
for easier management of servers and applications, since you can manage them as a single
instance

c. Application Virtualization
Ability of remote applications operating on computers as if they reside naturally on the hard
drive, but instead are running on a server. The ability to use RAM and CPU to run the programs
while storing them centrally on a server. Eg - Microsoft Terminal Services and cloud-based
software

37
2. Administrative Virtualization
Administrative virtualization is one of the least-known forms of virtualization, likely due to the
fact that it’s primarily used in data centers. The concept of administration, or ‘management,’
virtualization means segmented admin roles through group and user policies. Eg: IDaaS(
Indentity as a vervice).

3. Network Virtualization
Network virtualization involves virtually managing IPs, and is accomplished through tools like
routing tables, NICs, switches, and VLAN tags.
It also automates many network administrative tasks. Network virtualization is specifically
useful for networks that experience a huge, rapid, and unpredictable traffic increase.
Two categories:
 Internal: Provide network-like functionality to a single system.
 External: Combine many networks or parts of networks into a virtual unit.
Advantage: The intended result of network virtualization provides improved network
productivity and efficiency.

4. Hardware Virtualization
The hypervisor controls the processor, memory, and other hardware components by allowing
the different OS to run on the same machine without the need for source code.
Hardware virtualization is further subdivided into the following types:
 Full Virtualization –simulation of the “actual hardware” done to allow the software to
run an unmodified guest OS. No modification is required.
 Para Virtualization – In this type of virtualization, software unmodified runs in
modified OS as a separate system.
 Partial Virtualization – In this type of hardware virtualization, the software may need
modification to run.

5. Storage Virtualization
Storage virtualization is an array of servers that are managed by a virtual storage system. The
servers aren’t aware of exactly where their data is.
38
Advantage:
 Improved storage management in a heterogeneous environment
 Cost saving, Easy updates, better availability
 Better storage utilization
 Automated management
6. Memory Virtualization
Memory virtualization enhances performance by providing greater memory capacity without
any addition to the main memory.
7.Data Virtualization
Without any technical details, you can easily manipulate data. It decreases the data errors and
workload.

8.Desktop virtualization
As one can access remotely, you are able to work from any location and on any PC. It provides
a lot of flexibility for employees to work from home.

It also protects confidential data from being lost or stolen by keeping it safe on central servers.

Fig – Desktop Virtualization

39
LEVELS OF VIRTUALIZATION
The Various levels of virtualization are …
 Instruction Set Architecture Level
 Hardware Abstraction Level
 Operating System Level
 Library Support Level
 User-Application Level

Figure – Levels of Virtualization

Relative Merits of Different Approaches


Table below compares the relative merits of implementing virtualization at various levels. The
40
column headings correspond to four technical merits. “Higher Performance” and “Application
Flexibility” are self-explanatory. “Implementation Complexity” implies the cost to implement
that particular virtualization level. “Application Isolation” refers to the effort required to isolate
resources committed to different VMs. Each row corresponds to a particular level of
virtualization. The number of X’s in the table cells reflects the advantage points of each
implementation level.

1. ISA virtualization
 This virtualization is helpful to run heaps of legacy code which was originally written for
different hardware configurations.

 It is possible to run a large amount of legacy binary code written for various processors
on any given new hardware host machine.

 Instruction set emulation leads to creation of virtual ISAs on any hardware machine.
The basic emulation method is through code interpretation.
 An interpreter program interprets the source instructions to target
instructions one by one.
 One source instruction may require tens or hundreds of native target
instructions to perform its function. Obviously, this process is relatively
slow.

 For better performance, dynamic binary translation is used.


 This approach translates basic blocks of dynamic source instructions to
target instructions.
 Virtual instruction set architecture (V-ISA) thus requires adding a
41
processor-specific software translation layer to the compiler.
2. Hardware Abstraction Level [HAL]

 Hardware-level virtualization is performed right on top of the bare hardware.

 This approach generates a virtual hardware environment for a VM. On the other hand,
the process manages the underlying hardware through virtualization.

 MAIN IDEA: The idea is to virtualize a computer’s resources, such as its processors,
memory, and I/O devices.

 This way multiple users can use the same hardware with numerous instances of
virtualization at the same time.
 IBM had first implemented this on the IBM VM/370 back in 1960. It is more
usable for cloud-based infrastructure.

 currently, Xen hypervisors are using HAL to run Linux and other OS on x86

based machines.

3. Operating System Level

 OS-level virtualization creates isolated containers. The containers behave like real
servers.

 OS-level virtualization is commonly used in creating virtual hosting environments to


allocate hardware resources among a large number of mutually distrusting users.
When the number of users is high, conflicts arise while sharing hardware. So OS level
virtualization, every user gets their own virtual environment with dedicated virtual hardware
resource. This way, no conflicts arise.

42
Figure-The OpenVZ virtualization layer inside the host OS, which provides some OS images to
create VMs quickly

4. Library Support Level


 OS system calls are lengthy and cumbersome. Which is why applications opt
for APIs.

 Library level virtualization provide API.


 Most applications use APIs exported by user-level libraries rather than using lengthy
system calls by the OS.
 Virtualization with library interfaces is possible by controlling the communication
link between applications and the rest of a system through API.

43
5. User-Application Level

 Virtualization at the application level virtualizes an application as a VM application-level


virtualization is also known as process-level virtualization.

 The virtualization layer sits as an application program on top of the operating system

 This method is used to deploy high level language (HLL) VMs.

 Other forms of application-level virtualization known are application isolation,


application sandboxing, or application streaming.

44
Virtualization Structures

 Before virtualization, the operating system manages the hardware.


 After virtualization, a virtualization layer is inserted between the hardware and the
operating system. The virtualization layer is responsible for converting portions of the
real hardware into virtual hardware.

Depending on the position of the virtualization layer, there are several classes of VM
architectures, namely the hypervisor architecture, paravirtualization, and full virtualization
host-based virtualization.

1. Hypervisor architecture ((Hardware Assisted Architecture))


2.Full Virtualization Architecture ((Variation - Host-Based Virtualization
architecture)
3. Para Virtualization architecture

1.Hypervisor architecture [also called as Hardware Assisted Architecture]


 The hypervisor supports hardware-level virtualization in bare metal devices like
CPU, memory, disk and network interfaces.

 Essentially, a hypervisor must be able to convert physical devices into virtual resources
dedicated for the deployed VM to use.

 The hypervisor provides hypercalls for the guest OSes and applications.

 Depending on the functionality, a hypervisor can assume a micro-kernel


architecture like the Microsoft Hyper-V. Or it can assume a monolithic hypervisor
architecture like the VMware ESX for server virtualization.

 A micro-kernel hypervisor includes only the basic and unchanging functions (such
as physical memory management and processor scheduling). The device drivers and
other changeable components are outside the hypervisor.

45
 A monolithic hypervisor implements all the functions of microlevel and more,
including those of the device drivers and other changeable components.

a.Hypervisor and Xen Architecture

The Xen Architecture – Tool:Zen

 Xen is an open source hypervisor program.


 Xen is a microkernel hypervisor, which separates the policy from the mechanism.
 Policy is handled by Domain 0.
 Xen does not include any device drivers natively (becoz it supports microkernel
architecture)

It just provides a mechanism by which a guest OS can have direct access to the physical
devices. As a result, the size of the Xen hypervisor is kept rather small.

The core components of a Xen system are the hypervisor, kernel, and applications

Like other virtualization systems, many guest OSes can run on top of the hypervisor.

However, not all guest OSes are created equal, and one in particular controls the others. The
guest OS, which has control ability, is called Domain 0, and the others are called Domain
U.

Multiple instances of a VM can exist at any point.

46
Figure – Xen Architecture (Hypervisor based/hardware assisted based)

Domain 0

 Domain 0 is a privileged guest OS of Xen. It is first loaded when Xen boots without
any file system drivers being available. Domain 0 is designed to access hardware
directly and manage devices.
 Therefore, one of the responsibilities of Domain 0 is to allocate and map hardware
resources for the guest domains (the Domain U domains).

Advantage
Domain 0, behaving as a VMM, allows users to create, copy, save, read, modify, share,
migrate, and roll back VMs as easily as manipulating a file,

Disadvantage: (Security and Xen):=

For example, if Xen is based on Linux and its security level is C2. Its management VM is
named Domain 0, which has the privilege to manage other VMs implemented on the same
host. If Domain 0 is compromised, the hacker can control
47
2. Full Virtualization Architecture
 Full virtualization does not need any modification to the host OS.
 It relies on binary translation to trap and to virtualize the execution of certain
sensitive, nonvirtualizable instructions.
 Normally The guest OSes and their applications consist of noncritical and critical
instructions.
 With full virtualization, noncritical instructions run on the hardware directly while critical
instructions are discovered and replaced with traps into the VMM to be emulated by
software.

 Why are only critical instructions trapped into the VMM? This is because binary
translation can incur a large performance overhead.

 Noncritical instructions do not control hardware or threaten the security of the system,
but critical instructions do.

Advantage:

Therefore, running noncritical instructions on hardware not only can promote efficiency, but
also can ensure system security.

a. Binary Translation of Guest OS Requests Using a VMM

 Binary Translation of Guest OS Requests Using a VMM

 VMware puts the VMM at Ring 0 and the guest OS at Ring 1.

 The VMM scans the instruction stream and identifies the privileged, control- and
behavior-sensitive instructions.

 When these instructions are identified, they are trapped into the VMM, which emulates
the behavior of these instructions. The method used in this emulation is called binary
translation.

48
 Therefore, full virtualization combines binary translation and direct execution.
 Tool- VMWare : The below diagram is diagram of full virtualization structure based on
the virtualization tool VMWare

Figure: - Indirect execution of complex instructions via binary translation of guest OS


requests using the VMM plus direct execution of simple instructions on the same host.( Tool-
VMWare )

Advantage: The guest OS is completely decoupled from the underlying hardware.


Consequently, the guest OS is unaware that it is being virtualized.

Disadvantage
The performance of full virtualization may not be ideal, because it involves binary translation
which is rather time-consuming. In particular, the full virtualization of I/O-intensive
applications is a really a big challenge because it increases the cost of memory usage.

2.b Host Based Virtualization

An alternative VM architecture is to install a virtualization layer on top of the host OS. This
host OS is still responsible for managing the hardware. The guest OSes are installed and run
on top of the virtualization layer. Again, no changes to host OS is required.

Dedicated applications may run on the VMs and also some other guest applications can also
49
run with the host OS directly.
 Tool- VMWare : The below diagram is diagram of host based virtualization structure
based on the virtualization tool VMWare

Figure: Indirect execution of complex instructions via binary translation of guest OS requests
using the VMM plus direct execution of simple instructions on the same host.

Advantages

 First, the user can install this VM architecture without modifying the host OS.

 This will simplify the VM design and ease its deployment.

 The virtualizing software can rely on the host OS to provide device drivers

Disadvantages

 The performance of the host-based architecture can be low

 When an application requests hardware access, it involves four layers of mapping


which downgrades performance significantly. 50
 Therefore Although the host-based architecture has flexibility, the performance is too
low to be useful in practice.

3.Para Virtualization Virtualization Structures

 Before virtualization, the operating system manages the hardware.


 After virtualization, a virtualization layer is inserted between the hardware and the
operating system. The virtualization layer is responsible for converting portions of the
real hardware into virtual hardware.

Depending on the position of the virtualization layer, there are several classes of VM
architectures, namely the hypervisor architecture, paravirtualization, and full virtualization
host-based virtualization.

1. Hypervisor architecture ((Hardware Assisted Architecture))


2.Full Virtualization Architecture ((Variation - Host-Based Virtualization
architecture)

3. Para Virtualization architecture

1.Hypervisor architecture [also called as Hardware Assisted Architecture]


 The hypervisor supports hardware-level virtualization in bare metal devices like
CPU, memory, disk and network interfaces.

 Essentially, a hypervisor must be able to convert physical devices into virtual resources
dedicated for the deployed VM to use.

 The hypervisor provides hypercalls for the guest OSes and applications.

 Depending on the functionality, a hypervisor can assume a micro-kernel


architecture like the Microsoft Hyper-V. Or it can assume a monolithic hypervisor
architecture like the VMware ESX for server virtualization.

51
 A micro-kernel hypervisor includes only the basic and unchanging functions (such
as physical memory management and processor scheduling). The device drivers and
other changeable components are outside the hypervisor.

 A monolithic hypervisor implements all the functions of microlevel and more,


including those of the device drivers and other changeable components.

a.Hypervisor and Xen Architecture

The Xen Architecture – Tool:Zen

 Xen is an open source hypervisor program.


 Xen is a microkernel hypervisor, which separates the policy from the mechanism.
 Policy is handled by Domain 0.
 Xen does not include any device drivers natively (becoz it supports microkernel
architecture)

It just provides a mechanism by which a guest OS can have direct access to the physical
devices. As a result, the size of the Xen hypervisor is kept rather small.

The core components of a Xen system are the hypervisor, kernel, and applications

Like other virtualization systems, many guest OSes can run on top of the hypervisor.

However, not all guest OSes are created equal, and one in particular controls the others.
The guest OS, which has control ability, is called Domain 0, and the others are called
Domain U. Multiple instances of a VM can exist at any point.

52
Figure – Xen Architecture (Hypervisor based/hardware assisted based)

Domain 0

 Domain 0 is a privileged guest OS of Xen. It is first loaded when Xen boots without
any file system drivers being available. Domain 0 is designed to access hardware
directly and manage devices.
 Therefore, one of the responsibilities of Domain 0 is to allocate and map hardware
resources for the guest domains (the Domain U domains).

Advantage
Domain 0, behaving as a VMM, allows users to create, copy, save, read, modify, share,
migrate, and roll back VMs as easily as manipulating a file,

Disadvantage: (Security and Xen):=

For example, if Xen is based on Linux and its security level is C2. Its management VM is
named Domain 0, which has the privilege to manage other VMs implemented on the same
host. If Domain 0 is compromised, the hacker can control 53
2. Full Virtualization Architecture
 Full virtualization does not need any modification to the host OS.
 It relies on binary translation to trap and to virtualize the execution of certain
sensitive, nonvirtualizable instructions.
 Normally The guest OSes and their applications consist of noncritical and critical
instructions.
 With full virtualization, noncritical instructions run on the hardware directly while critical
instructions are discovered and replaced with traps into the VMM to be emulated by
software.

 Why are only critical instructions trapped into the VMM? This is because binary
translation can incur a large performance overhead.

 Noncritical instructions do not control hardware or threaten the security of the system,
but critical instructions do.

Advantage:

Therefore, running noncritical instructions on hardware not only can promote efficiency, but
also can ensure system security.

a. Binary Translation of Guest OS Requests Using a VMM

 Binary Translation of Guest OS Requests Using a VMM

 VMware puts the VMM at Ring 0 and the guest OS at Ring 1.

 The VMM scans the instruction stream and identifies the privileged, control- and
behavior-sensitive instructions.

 When these instructions are identified, they are trapped into the VMM, which emulates
the behavior of these instructions. The method used in this emulation is called binary
translation. 54
 Therefore, full virtualization combines binary translation and direct execution.
 Tool- VMWare : The below diagram is diagram of full virtualization structure based on
the virtualization tool VMWare

Figure: - Indirect execution of complex instructions via binary translation of guest OS


requests using the VMM plus direct execution of simple instructions on the same host.( Tool-
VMWare )

Advantage: The guest OS is completely decoupled from the underlying hardware.


Consequently, the guest OS is unaware that it is being virtualized.

Disadvantage
The performance of full virtualization may not be ideal, because it involves binary translation
which is rather time-consuming. In particular, the full virtualization of I/O-intensive
applications is a really a big challenge because it increases the cost of memory usage.

2.b Host Based Virtualization

An alternative VM architecture is to install a virtualization layer on top of the host OS. This
host OS is still responsible for managing the hardware. The guest OSes are installed and run
on top of the virtualization layer. Again, no changes to host OS is required.

55
Dedicated applications may run on the VMs and also some other guest applications can also
run with the host OS directly.

 Tool- VMWare : The below diagram is diagram of host based virtualization structure
based on the virtualization tool VMWare

Figure: Indirect execution of complex instructions via binary translation of guest OS requests
using the VMM plus direct execution of simple instructions on the same host.

Advantages

 First, the user can install this VM architecture without modifying the host OS.

 This will simplify the VM design and ease its deployment.

 The virtualizing software can rely on the host OS to provide device drivers

Disadvantages

 The performance of the host-based architecture can be low


56
 When an application requests hardware access, it involves four layers of mapping
which downgrades performance significantly.

 Therefore Although the host-based architecture has flexibility, the performance is too
low to be useful in practice.

3. Para Virtualization
• In Previous two methods Performance degradation is a critical issue of a virtualized
system. To Overcome that Para Virtualization is used

• Para Virtualization Needs Modification done on guest OS.


• However, para-virtualization attempts to reduce the virtualization overhead, and thus
improve performance by modifying only the guest OS kernel
• para-virtualization replaces nonvirtualizable instructions with hypercalls that
communicate directly with the hypervisor or VMM.

• Advantage: Reduces Overhead


• Disadvantage:
• Portability
• Cost of maintaining para-virtualized OSes is high
• Performance based on workload

Figure - The use of a para-virtualized guest OS assisted by an intelligent compiler to replace


nonvirtualizable OS instructions by hypercalls.
57
3.a Para Virtualization in Tool: VMWare

Para-virtualized VM architecture, which involves modifying the guest OS kernel to replace


nonvirtualizable instructions with hypercalls for the hypervisor or the VMM to carry out the
virtualization process.

Figure: Para Virtualization in VMWare

3.b Para Virtualization in tool: VMware ESX server

ESX is a VMM or a hypervisor for bare-metal x86 symmetric multiprocessing (SMP) servers. It
accesses hardware resources such as I/O directly and has complete resource management
control. An ESX-enabled server consists of four components: a virtualization layer, a resource
manager, hardware interface components, and a service console, as shown in Figure below.
To improve performance, the ESX server employs a para-virtualization architecture in which
the VM kernel interacts directly with the hardware without involving the host OS.

58
Figure: The VMware ESX server architecture using para-virtualization.
59
Virtualization Tools and Mechanisms
Virtualization Tools
1.XEN
2.VMware
3.VirtualBox
4.KVM

5.HyperV
6.OpenVZ

1.XEN
XEN runs on LINUX and UNIX.
XEN is included with most popular Linux Platforms like Fedora, RHEL, CentOS, Ubuntu and
Debian.
Features:
It is Open Source
Supports Paravirtualization and Hardware Assisted Virtualization

Figure: XEN with Full Virtualization and Para Virtualization


2.VMWARE
VMWARE is a software industry and comes in 3 different packages VMWare Workstation,
VMWare Fusion and VMware.

Features:
Both Free and Paid
Supports Windows, Linux and MaC OS 60
Easy to use, Quick Installation
Supports Paravirtualization, Full Virtualization and Hardware Assisted Virtualization

3.VirtualBox
VirtualBox is a general-purpose virtualization tool for x86 and x86-64 hardware, targeted at
server, desktop, and embedded use, that allows users and administrators to easily run multiple
guest operating systems on a single host.

Features:
Open Source
Supports Windows, Solaris,Linux and MaC OS
Easy to use,
Supports Paravirtualization and Hardware Assisted Virtualization

4.KVM
KVM hypervisor is the virtualization layer in Kernel-based Virtual Machine (KVM), a free,
open source virtualization architecture for Linux distributions.

Features:
Open Source
Supports Linux
Supports Para Virtualization, Full Virtualization and Hardware Assisted Virtualization
Powerful Command Line Interface

Figure: KVM structure


5. HYPERV
61
• Microsoft HyperV – Server virtualization product from Microsoft.
• This provides virtualization via hypervisor-based emulations.

• HyperV operates both as a stand-alone solution and as an addition to Windows server


2008 R2.

• HyperV isolates the physical machine into child partitions and allocates them to
various guest operating systems.
• HyperV improves server utilization as well as save the money of customer cmp to in-
house physical server.
Disadvantages are –
HyperV only works on Windows,
Its inability to virtualize audio hardware,
It doesn’t support burning to DISC, audio CDs, video CD/DD, etc.
6.OpenVZ
• OpenVZ – OpenVZ does virtualization in operating system level for Linux.

• Node’s kernel is used to split the operating system into containers and then, the

kernel will be shared between several VPS.

• OpenVZ uses two types of resources – dedicated resources (they are own resources

guaranteeing own VPS) and burst resources (they are the result of spare resources in
the system).

• OpenVZ doesn’t need many resources and since it shares kernel among various VPS
• OpenVZ can save memory and CPU.
Advantage
OpenVZ is low priced ,less complicated to set up and maintain.
User-friendly,lowest management complexity.

Disadvantages
– It only runs on Linux and doesn’t support Windows / BSD.

62
VIRTUALIZATION OF CPU – MEMORY – I/O DEVICES

1. CPU VIRTUALIZATION

2. MEMORY VIRTUALIZATION

3. I/O VIRTUALIZATION

1.CPU VIRTUALIZATION

 CPU virtualization involves a single CPU acting as if it were multiple separate CPUs.
 CPU Virtualization is a hardware feature found in all current AMD & Intel CPUs that
allows a single processor to act as if it was multiple individual CPUs. This allows an
operating system to more effectively & efficiently utilize the CPU power in the computer
so that it runs faster.

 CPU Virtualization goes by different names depending on the CPU manufacturer. For
Intel CPUs, this feature is called Intel Virtualization Technology, or Intel VT, and with
AMD CPUs it is called AMD-V.
 CPU virtualization is disabled by default in the BIOS and needs to be enabled in order
for an operating system to take advantage of it.

Figure – CPU Virtualization with Peripheral Component interconnect

 The critical instructions are divided into three categories:


 Unprivileged instructions, ( CPU’s USER MODE)
 Privileged instructions, ( CPU’s USER MODE)
 Control sensitive instructions, and ( CPU’s SUPERVISOR MODE)

63
 Behavior-sensitive instructions (CPU’s SUPERVISOR MODE)
 A CPU architecture is virtualizable if it supports the ability to run the VM’s privileged and
unprivileged instructions in the CPU’s user mode while the VMM runs in CPU’s supervisor
mode.

 ---RISC CPU architectures can be naturally virtualized


 ---x86 CPU architectures are not primarily designed to support virtualization

x86 INTEL processors are not virtualizable primarily, great effort is taken to virtualize them as
follows
 hardware-assisted virtualization {or} Para & hardware-assisted virtualization must be
used.

 Intel calls the privilege level of x86 processors the VMX Root Mode.
 In order to control the start and stop of a VM a set of additional instructions are added
 All virtualization vendors(companies offering virtualization technique) like Xen, VMware,
and the Microsoft Virtual PC all implement their hypervisors by using the VT-x
technology.
 Intel and AMD add an additional mode called privilege mode level (some people call it
Ring-1)
 Operating systems can still run at Ring 0 and the hypervisor can run at Ring -1 to create
and manage virtual machines.

Figure- CPU Virtualization of x86 INTEL processors


64
2.MEMORY VIRTUALIZATION

virtual memory virtualization involves sharing the physical system memory in RAM and
dynamically allocating it to the physical memory of the VMs
• Two-stage mapping process should be maintained by the guest OS and the VMM,
respectively:

• virtual memory to physical memory and


• physical memory to machine memory.
• Furthermore, MMU virtualization should be supported.

• The guest OS continues to control the mapping of virtual addresses to the


physical memory addresses of VMs. But the guest OS cannot directly access the
actual machine memory.

• The VMM is responsible for mapping the guest physical memory to the actual
machine memory.

Figure – Virtualization of Memory Management

65
Figure – Two-Level Memory Management Scheme
Memory Virtualization in INTEL
Intel developed a hardware based EPT(Extended Page Table by Intel for Memory
Virtualization) technique.

When the virtual address of the L4 page table is obtained, the CPU will calculate the virtual
address of the L3 page table so on till L1 to get the virtual address

So at a minimum 20 memory accesses in the worst case is required, it slows the


performance.

Figure:- Memory virtualization using EPT by Intel

66
3.I/O VIRTUALIZATION

In I/O virtualization, a virtual device is substituted for its physical equivalent, such as a
network interface card (NIC) or host bus adapter (HBA),I/O Ports and input, output,
memory-storage devices.

Benefits
• Improve performance by using idle slots
• Reduce the cost of data center cooling, heating and power

I/O virtualization involves managing the routing of I/O requests between virtual devices and
the shared physical hardware.

Figure -I/O Virtualization


There are three ways to implement I/O virtualization:
* Full device emulation
*Para-virtualization
*Direct I/O
1. FULL DEVICE VIRTUALIZATION
• All the functions of a device or bus infrastructure, such as device enumeration,
identification, interrupts, and DMA, are replicated in software.

• This software is located in the VMM and acts as a virtual device.

• Disadvantage: =Slow

67
2. PARA VIRTUALIZATION
• It is also known as the split driver model consisting of a frontend driver and a
backend driver.

• The frontend driver manages the I/O requests of the guest OSes
• The backend driver is responsible for managing the real I/O devices.
• Disadvantage: Higher Overhead

3.DIRECT I/O VIRTUALIZATION


• Direct I/O virtualization lets the VM access devices directly.

• It can achieve close-to-native performance without high CPU costs

VMware Workstation for I/O Virtualization

The VMware Workstation runs as an application. It leverages the I/O device support in guest
OSes, host OSes,and VMM to implement I/O virtualization. The application portion (VMApp)
uses a driver loaded into the host operating system (VMDriver) to establish the privileged VMM,
which runs directly on the hardware.

Intel hardware support for virtualization of processor, memory, and I/O devices.
Figure 3.10 provides an overview of Intel’s full virtualization techniques. For processor
virtualization, Intel offers the VT-x or VT-i technique. VT-x adds a privileged mode (VMX Root
Mode) and some instructions to processors. For memory virtualization, Intel offers the EPT,
which translates the virtual address to the machine’s physical addresses to improve
performance. For I/O virtualization, Intel implements VT-d and VT-c to support this.

Figure - Intel hardware support for virtualization of processor, memory, and I/O
devices.

68
Disaster Recovery

Virtual disaster recovery is a type of disaster recovery process that typically


involves replication of cloud VMs and offer business continuity even during
system, network, hardware or software failure.

 For virtual disaster recovery, an organization should copy virtual machine (VM)
workloads off-site on a regular basis.
 Replication can essentially make a real-time copy of VMs in a separate location, thus
strengthening disaster recovery process.

Benefits of Virtualized Disaster Recovery

 Virtualized platforms typically provide high availability in the event of a failure.


 Virtualization helps set up recovery time objectives (RTOs) and recovery point
objectives (RPOs), as replication is done as frequently as needed, especially for critical
systems.
 Virtualized disaster recovery planning and failover testing is also simpler with virtualized
workloads than with a physical setup, making disaster recovery a more attainable
process for organizations.

4 Ways Virtualization helps with Disaster Recovery


1. Recover to any hardware
By using a virtualized environment, you don’t have to worry about having completely
redundant hardware.

2. Backup and restore full images

By having your system completely virtualized each of your server’s files are encapsulated in a
single image file. An image is basically a single file that contains all of server’s files, including
system files, programs, and data; all in one location.

3. Run other workloads on standby hardware

which restarts a virtual machine on a different server when the original hardware fails,
4. Offsite backup
Having an offsite backup is a huge advantage. whether it be a natural disaster, a power
outage, or a water pipe bursting, it is nice to have all your information at an offsite location.

69
Virtual disaster recovery plan and testing plan

 Virtual disaster Recovery Plan


 Decide which systems and data are the most critical for recovery, and document
them.
 Complete a risk assessment and business impact analysis to outline possible risks
and their potential impacts.

 Define RTOs (recovery time objectives) and RPOs (recovery point objectives).
 Test the plan.
 Virtual disaster Recovery test Plan
The organization should review and test its virtual disaster recovery plan on a regular
basis, especially after any changes have been made to the cloud environment.

Fig – Disaster Recovery Plan

DRaaS [DISASTER RECOVERY AS A SERVICE]

 DRaaS is the replication of hosting of physical or virtual servers by a third party to


provide failover in the event of a man made or natural catastrophe.
 DRaaS is especially useful to organizations that lack the necessary expertise to provision,
configure, and test an effective disaster recovery plan (DRP).

70
Working of DRaaS
1.Replication – Duplicating data from a live environment and sending it to a third-party
that can host the environment remotely.
2. Failover – The process of moving user data during a catastrophe to the third-party host.
3.Failback – The process of moving data from the third-party host’s environment back to
the end user.

Figure – Working of Disaster Recovery Service

DRaaS disaster recovery services-OPTIONS

1. Self-Service – Buy the solution and run it yourself


2.Assisted Service– Buy a solution that’s supported by DRaaS pros who can offer advice or
assistance, as needed.
3. Managed Service– Outsource your DRaaS to experts who can devise your plan and
manage it for you.
Benefits of DRaaS

It offers continuity of cloud services during


1. Power outage/shortage on-premises
2. Network failure
3. Software error, systems error
4. On-premises data center failure
5. Security-related (malware attack)

71
Major vendors

There are several data protection vendors that offer comprehensive virtual backup and
disaster recovery. Some key players include:

 Acronis Disaster Recovery Service protects virtual and physical systems.


 Nakivo Backup & Replication provides data protection for VMware, Microsoft Hyper-V
and AWS Elastic Compute Cloud.
 SolarWinds Backup features recovery to VMware, Microsoft Hyper-V, Microsoft Azure
and Amazon VMs.

 Veeam Software offers backup and recovery for physical and cloud workloads as well.
 VMware, a pioneer in virtualization, provides disaster recovery through products such
as Site Recovery Manager and vSphere Replication.
 Zerto's flagship Virtual Replication product features one-to-many replication and
automated recovery.

72
73
Assignments

74
Assignment - II
`

Assume you are creating a start-up software company, Explore the options
available in AWS to create a cloud infrastructure for your start-up and
submit the plan. (CO3, K3)

Submit a survey report on Security Issues and Security Standards with


respect to Cloud Computing. (CO4, K3)

Do a PowerPoint presentation on cloud technologies like Hadoop, Map


Reduce, Virtual box, Google App Engine, etc., (CO5, K3)

75
Question Bank

76
Unit II
Part A (CO2, K2)
1. What is SOA?
SOA, or Service-Oriented Architecture, is defined as the design of a software system
that makes use of services of new or legacy applications through their published or
discoverable interfaces.
2. List the characteristics of SOA.
 Logical view
 Message orientation
 Description Orientation

3. What are the benefits of SOA?


 Service reusability
 Easy maintenance
 Platform independent
 Availability
 Reliability
 Scalability
4. What are the limitations of SOA?
 High overhead
 High investment
 Complex service management

5. List the different styles of SOA


 REST (Representational State Transfer)
 WS (Web Services)
6. Define REST.
 REST is a software architecture style for distributed systems, particularly distributed
hypermedia systems, such as the World Wide Web.
 It is used by companies like Google, Amazon, Yahoo!, and especially social networks
such as Facebook and Twitter because of its simplicity, and its ease of being published
and consumed by clients.

7.What are the principles of REST Architecture Style?


 Resource Identification through URIs
 Uniform, Constrained Interface
 Self-Descriptive Message
 Stateless Interaction

8. List any two advantages of RESTFUL web service?


 RESTful web services can be considered an alternative to SOAP stack because of their
simplicity, lightweight nature, and integration with HTTP
 With the help of URIs and hyperlinks, REST has shown that it is possible to discover
web resources without an approach based on registration to a centralized repository.

7.List the limitation of RESTFUL web service.


 There are not a variety of toolkits for developing RESTful applications

77
 REST is not a standard. It is a design and architectural style for large-scale distributed
systems.

10. Define Web Service.


 “web service” is often referred to a self-contained, self-describing, modular application
designed to be used and accessible by other software applications across the web.
11. What are the Technologies used Web Services?
 Simple Object Access Protocol (SOAP)
 Web Services Description Language (WSDL)

12. Differentiate SOAP and REST based Web services.

13. What is publish/subscribe model?


 It is an asynchronous communication method in which messages are exchanged
between applications without knowing the identity of the sender or recipient.
 It describes a model for linking source and destination for a message bus

13. Give any two applications of pub/sub mode.


 Event notification
 Data streaming
14. What are the advantages publish/subscribe model?
 Loose coupling
 Scalability

15.Difference Between Cloud Computing and Virtualization


Cloud Computing Virtualization
It is a methodology of delivering It is a technique of creating a virtual
host services over the internet version of a computer hardware platform,
storage devices or a network resource
Cloud configuration is template based Virtualization configuration is
image based
Helps to provide resources to a group of Helps to deliver packaged resources to a
users for various task set of users for a particular task

78
17. What are the two types of hypervisor
Tpyes of Hypervisor/VMM
Type-1:Bare Metal Hypervisor
Type-2:Hosted Hypervisor
Type 1 hypervisor: hypervisors run directly on the system hardware – A “bare metal”
embedded hypervisor.
Type 2 hypervisor: hypervisors run on a host operating system that provides virtualization
services, such as I/O device support and memory management.

18. Hardware Virtualization


The hypervisor controls the processor, memory, and other hardware components by allowing
the different OS to run on the same machine without the need for source code.
Hardware virtualization is further subdivided into the following types:
 Full Virtualization –simulation of the “actual hardware” done to allow the software to
run an unmodified guest OS. No modification is required.
 Para Virtualization – In this type of virtualization, software unmodified runs in modified
OS as a separate system.
 Partial Virtualization – In this type of hardware virtualization, the software may need
modification to run.
19. List the 4 critical instructions used in CPU Virtualization
 Unprivileged instructions, ( CPU’s USER MODE)
 Privileged instructions, ( CPU’s USER MODE)
 Control sensitive instructions, and ( CPU’s SUPERVISOR MODE)
 Behavior-sensitive instructions (CPU’s SUPERVISOR MODE)
20. Define steps in two phase memory mapping
• Two-stage mapping process should be maintained by the guest OS and the VMM,
respectively:
• Virtual memory to physical memory and
• Physical memory to machine memory.
The guest OS continues to control the mapping of virtual addresses to the physical memory
addresses of VMs. But the guest OS cannot directly access the actual machine memory.
The VMM is responsible for mapping the guest physical memory to the actual machine
memory.

21. Define I/O virtualization?


In I/O virtualization, a virtual device is substituted for its physical equivalent, such as a
network interface card (NIC) or host bus adapter (HBA),I/O Ports and input, output,
memory-storage devices.

22. List the types of I/O Virtualization

 Full device Virtualization


 Para-Virtualization
 Direct I/O Virtualization

23. List the Various levels of virtualization are …


 Instruction Set Architecture Level
 Hardware Abstraction Level
 Operating System Level
 Library Support Level 79
 User-Application Level
24. List the types of virtualization structure
1. Hypervisor architecture ((Hardware Assisted Architecture))
2. Full Virtualization Architecture ((Variation - Host-Based Virtualization architecture)
3. Para Virtualization architecture

25. What are the features of XEN virtualization tool


XEN runs on LINUX and UNIX.
XEN is included with most popular Linux Platforms like Fedora, RHEL, CentOS,
Ubuntu and Debian.
Features:
It is Open Source
Supports Paravirtualization and Hardware Assisted Virtualization

26. What are the features of KVM virtualization tool


VMWARE is a software industry and comes in 3 different packages VMWare
Workstation, VMWare Fusion and VMware.
Features:
Both Free and Paid
Supports Windows, Linux and MaC OS
Easy to use, Quick Installation
Supports Paravirtualization, Full and Hardware Assisted Virtualization

27.What are the working options of DRaaS


1.Replication – Duplicating data from a live environment and sending it to a third-party that
can host the environment remotely.
2. Failover – The process of moving user data during a catastrophe to the third-party host.
3.Failback – The process of moving data from the third-party host’s environment back to the
end user.

28. List the 4 ways virtualization helps disaster revovery


1.Recovery to any hardware
2.Backup and restore full virtualized images
3.Run workload on standby
4.Offsite backup

29. How does virtualization help disaster recovery?


Virtualization greatly simplifies disaster recovery, since it does not require rebuilding a
physical server environment. Instead, you can move your virtual machines over to another
system and access them as normal.
Live migration allows moving of one virtual server to another virtual server that could be in a
different location that is some distance from the original data center.

30. How can DRaaS benefit customers?


It offers continuity of cloud services during
1. Power outage/shortage on-premises
2. Network failure
3. Software error, systems error
4. On-premises data center failure
5. Security-related (malware attack)
80
Unit 2 - Part B - Questions: (CO2)

1. Briefly explain the following (K2)


(i) Characteristics of SOA
(ii) Evolution of SOA
2. Explain the importance RESTFUL service with relevant examples.
(K2)
3. Briefly explain the SOAP Based webservice with neat sketch (K2)
4. Explain the working of publish/subscribe mode. (K2)
5. Explain the various types of Virtualization. (K2)
6. Discuss in detail about various levels of virtualization. (K2)
7. List and explain various structures of virtualization with example
tools. (K2)
8. Elucidate virtualization tools and mechanism. (K3)
9. (i) Explain in detail about CPU virtualization. (K2)
(ii) Types of Hypervisor.
10.Explain in detail about Memory virtualization. (K2)
11.Discuss in detail about I/O virtualization. (K2)
12.Explain about disaster recovery using virtualization. (K2)

81
Supportive Online
Courses

82
Relevant Online Courses

S. Course Title Link Platform


No
1 Cloud Computing https://nptel.ac.in NPTEL / Swayam
/courses/106/105
/106105167/#
2 Cloud Computing Applications, https://www.cour Coursera
Part 1: Cloud Systems and sera.org/learn/clo
Infrastructure ud-applications-
part1?specializati
on=cloud-
computing#syllab
us
3 Projects in Cloud Computing https://www.ude Udemy
my.com/course/pr
ojects-in-cloud-
computing/
4 Google Cloud Computing https://swayam.g NPTEL / Swayam
Foundations Course ov.in/nd1_noc20_
cs55/preview#:~:t
ext=The%20Googl
e%20Cloud%20Co
mputing%20Foun
dations,Google%2
0Cloud%20Platfor
m%20fits%20in.
5 Fast Track to Cloud https://www.expe Experfy
Comprehension -- IaaS, PaaS, rfy.com/training/c
SaaS on AWS, Azure, Google and ourses/fast-track-
Co to-cloud-
comprehension-
iaas-paas-saas-on-
aws-azure-google-
and-
co?code=CLOUD5
0

83
Real-time
Applications

84
Real world Examples of Cloud
Cloud Storage:
Drop Box
Gmail
Facebook

Marketing:
Maropost
Hubspot
Adobe Marketing Cloud

Education:
SlideRocket
Ratatype
Amazon Web Services

Healthcare:
ClearData
Dell’s Secure Healthcare Cloud
IBM Cloud

85
Real Life Analogies
What would you prefer, either buy or rent car?
Buy Your Own Car
Buying a car is a big investment, and there are a lot of important decisions to take
into account. Some people like all the different options, and others don’t want to
bother with thousands of decisions. When buying a car you have full control over
everything, its make and model, cost, interior, etc. Additionally, you’ve got to work
about taxes, insurance, inspections, and all sorts of maintenance, you’ve got the
control, but it comes with a hassle.
Renting a Car
Then how about renting a car? You have fewer and simpler decisions to make.
You just need to select a car from what’s available, and you can switch your car if
something comes up.
Rent when you need; pay when you use. You don’t have to worry about
maintenance costs, tax, and insurance since they are included in your rental fee.
On the other hand, there are obviously some disadvantages. You’re limited by
what’s available from the rental vendor, you may not be allowed to customize the
car, and the car is not dedicated to you all the time.
Translating the Analogy to Cloud Computing
This simple real life analogy is easily translatable to Cloud Computing.
Buying your own car is similar to setting up your own on-premise data center. You
have the flexibility to customize whatever you like, starting from physical
infrastructure, the security system, hardware and software, etc. However, you
also have to invest a lot of money upfront. And also, you will also need to manage
it later when it’s operating.
On the other hand, instead of building your own data center, you can rent
computation power and storage from the cloud provider. You can scale in and out
when necessary. Just pay when you use. No specific commitment takes place. You
can start and stop anytime.

86
Contents Beyond
Syllabus

87
1. Serverless Computing
Serverless architecture (also known as serverless computing or function as a
service, FaaS) is a software design pattern where applications are hosted by a third-
party service, eliminating the need for server software and hardware management
by the developer. Applications are broken up into individual functions that can be
invoked and scaled individually.

Why Serverless Architecture?

Hosting a software application on the internet usually involves managing some


kind of server infrastructure. Typically this means a virtual or physical server that
needs to be managed, as well as the operating system and other web server
hosting processes required for your application to run. Using a virtual server from
a cloud provider such as Amazon or Microsoft does mean the elimination of the
physical hardware concerns, but still requires some level of management of the
operating system and the web server software processes.

With a serverless architecture, we focus purely on the individual functions in your


application code. Services such as Twilio Functions, AWS Lambda and Microsoft
Azure Functions take care of all the physical hardware, virtual machine operating
system, and web server software management. We only need to worry about our
code.

How does Serverless or FaaS Differ from PaaS?

PaaS, or Platform as a Service, products such as Heroku, Azure Web


Apps and AWS Elastic Beanstalk offer many of the same benefits as Serverless
(sometimes called Function as a Service or FaaS). They do eliminate the need for
management of server hardware and software. The primary difference is in the
way you compose and deploy your application, and therefore the scalability of
your application.
With PaaS, your application is deployed as a single unit and is developed in the
traditional way using some kind of web framework like ASP.NET, Flask, Ruby on
Rails, Java Servlets, etc. Scaling is only done at the entire application level. You
can decide to run multiple instances of your application to handle additional load.

88
2. Micro Services
Microservices are an architectural approach to building applications. As an
architectural framework, microservices are distributed and loosely coupled, so one
team’s changes won’t break the entire app. The benefit to using microservices is
that development teams are able to rapidly build new components of apps to
meet changing business needs.
A way to build apps, optimized for DevOps and CI/CD
What sets a microservices architecture apart from more traditional, monolithic
approaches is how it breaks an app down into its core functions. Each function is
called a service, and can be built and deployed independently, meaning individual
services can function (and fail) without negatively affecting the others. This helps
you to embrace the technology side of DevOps and make constant iteration and
delivery (CI/CD) more seamless and achievable.
Think of your last visit to an online retailer. You might have used the site’s search
bar to browse products. That search represents a service. Maybe you also saw
recommendations for related products—recommendations pulled from a database
of shopper preferences. That’s also a service. Did you add an item to an online
cart? You guessed it, another service.
So, a microservice is a core function of an application and it runs independent of
other services, but a microservices architecture is about more than just the loose
coupling of an app’s core functions—it’s about restructuring development
teams and interservice communication in a way that prepares for inevitable
failures, future scalability, and new feature integration.
How is this achieved? By adapting the basics of a service-oriented architecture
(SOA) to deploy microservices.

89
ASSESSMENT SCHEDULE
Tentative schedule for the Assessment During 2022-2023 odd
semester

Name of the Scheduled


S.NO Portion
Assessment Date

1 Unit Test 1 26.08.22 UNIT 1

2 IAT 1 19.09.2022 UNIT 1 & 2

3 Unit Test 2 12.10.22 UNIT 3

4 IAT 2 4.11.22 UNIT 3 & 4

5 Revision 28.11.22 ALL 5 UNITS

6 Model 5.12.22 ALL 5 UNITS

90
Prescribed Text Books
& References

91
Text Books and References
TEXT BOOKS:

T1: Kai Hwang, Geoffrey C. Fox, Jack G. Dongarra, "Distributed and Cloud
Computing, From Parallel Processing to the Internet of Things", Morgan
Kaufmann Publishers, 2012.

T2: Rittinghouse, John W., and James F. Ransome, ―Cloud Computing:


Implementation, Management and Security‖, CRC Press, 2017.

REFERENCES:

R1: Rajkumar Buyya, Christian Vecchiola, S. ThamaraiSelvi, ―Mastering


Cloud Computing‖, Tata Mcgraw Hill, 2013.

R2: Toby Velte, Anthony Velte, Robert Elsenpeter, "Cloud Computing - A


Practical Approach‖, Tata Mcgraw Hill, 2009.

R3: George Reese, "Cloud Application Architectures: Building Applications


and Infrastructure in the Cloud: Transactional Systems for EC2 and Beyond
(Theory in Practice)‖, O'Reilly, 2009.

92
Mini project
Suggestions

93
Mini Project Ideas
1. Design a dynamic website about yourself, showcasing your talents, skillsets,
interests, your opinion on current affairs and hobbies and host it in using
AWS cloud.

2. Implement a collaborative workspace for communication for you class


students using any cloud technology. (More like a Technical Forum, Virtual
Community).

3. Design a model secure health cloud for a hospital near your residence.

4. Implement a secure Framework for Digital Study Material sharing System


for your college.

5. Conduct a survey on Pre-emption-aware Energy Management in Virtualized


Cloud Centres.

6. Conduct a survey on the methods of Auditing in Cloud systems.

7. Show case a data leakage detection implementation in any cloud application


of your choice.

8. Can you implement a simple application which integrates Big Data, Machine
Learning concepts and deploy it in cloud platform?

9. Design a simple cloud based application to implement Car Pooling.

10. Can you think of any solution for COVID-19 (data gathering, data
management) using cloud?

94
Thank you

Disclaimer:

This document is confidential and intended solely for the educational purpose of RMK Group
of Educational Institutions. If you have received this document through email in error,
please notify the system manager. This document contains proprietary information and is
intended only to the respective group / learning community as intended. If you are not the
addressee you should not disseminate, distribute or copy through e-mail. Please notify the
sender immediately by e-mail if you have received this document by mistake and delete this
document from your system. If you are not the intended recipient you are notified that
disclosing, copying, distributing or taking any action in reliance on the contents of this
information is strictly prohibited.

95

You might also like