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

Complete Unit 2

The document provides a history and overview of cloud computing. It discusses how cloud computing evolved from mainframe computing in the 1950s, with multiple users accessing a central computer. In the 1970s, virtual machines allowed multiple operating systems to run simultaneously on one physical computer. In the 1990s, telecommunications companies offered virtual private networks. The document defines cloud computing, discusses types of cloud clients, and compares cloud computing to super, cluster, and grid computing as well as client-server architectures. It highlights key differences in scalability and ownership/control between cloud and client-server models.

Uploaded by

bdfine9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Complete Unit 2

The document provides a history and overview of cloud computing. It discusses how cloud computing evolved from mainframe computing in the 1950s, with multiple users accessing a central computer. In the 1970s, virtual machines allowed multiple operating systems to run simultaneously on one physical computer. In the 1990s, telecommunications companies offered virtual private networks. The document defines cloud computing, discusses types of cloud clients, and compares cloud computing to super, cluster, and grid computing as well as client-server architectures. It highlights key differences in scalability and ownership/control between cloud and client-server models.

Uploaded by

bdfine9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 217

Cloud Computing

Dr. Rajeev Kumar Gupta


Assistant Professor
Pandit Deendayal Energy University
Gandhinagar, Gujarat
1
Unit- 2

17 February 2024 107


History of Cloud Computing
 It was a gradual evolution that started in the 1950s with mainframe
computing.

 Multiple users were capable of accessing a central computer through dumb


terminals, whose only function was to provide access to the mainframe.

 Because of the costs to buy and maintain mainframe computers, it was not
practical for an organization to buy and maintain one for every employee.
Nor did the typical user need the large (at the time) storage capacity and
processing power that a mainframe provided.

 Providing shared access to a single resource was the solution that made
economical sense for this sophisticated piece of technology.

17 February 2024 108


 After some time, around 1970, the concept of virtual machines (VMs)
was created.

 Using virtualization software like VMware, it became possible to execute


one or more operating systems simultaneously in an isolated environment.

 Complete computers (virtual) could be executed inside one physical


hardware which in turn can run a completely different operating system.

 The virtualization technology took the 1950s’ shared access mainframe to


the next level, permitting multiple distinct computing environments to
reside on one physical environment

17 February 2024 109


 In the 1990s, telecommunications companies started offering
virtualized private network connections.

 Historically, telecommunications companies only offered single dedicated


point–to-point data connections.

 Instead of building out physical infrastructure to allow for more users to


have their own connections, telecommunications companies were now able
to provide users with shared access to the same physical infrastructure.

 The newly offered virtualized private network connections had the same
service quality as their dedicated services at a reduced cost.

17 February 2024 110


 The following list briefly explains the evolution of cloud computing:

 Cluster Computing

 Grid computing: Solving large problems with parallel computing

 Utility computing: Offering computing resources as a metered service.

 SaaS: Network-based subscriptions to application.


 Cloud computing: Anytime, anywhere access to IT resources delivered
dynamically as a service

 The trend toward cloud computing started in the late 1980s with the concept
of grid computing when, for the first time, a large number of systems were
applied to a single problem, usually scientific in nature and requiring
exceptionally high levels of parallel computation.

17 February 2024 111


Definition
In Broad terms:
“Cloud is a large group of interconnected computers”

Several different “loosely applied” definitions of cloud computing are there:

 It is a web based application in which everything is stored in the cloud.


Instead of running programs and data on an individual desktop computer,
everything is hosted in the “cloud” which is accessed via the Internet

 A style of computing in which massively scalable IT-related capabilities are


provided "as a service" using Internet technologies to multiple external
customers.

17 February 2024 112


Definition Continued
(NIST Definition, National Institute of Standards and Technology)

 Cloud computing is a model for enabling convenient, on-demand


network access to a shared pool of configurable computing
resources (e.g., networks, servers, storage, applications, and
services) that can be rapidly provisioned and released with
minimal management effort or service provider interaction.

17 February 2024 113


Definition from Wikipedia
 Cloud computing is Internet-based computing, whereby shared
resources, software, and information are provided to computers
and other devices on demand, like the electricity grid.

 Cloud computing is a style of computing in which dynamically


scalable and often virtualized resources are provided as a
service over the Internet.
Definition from Buyya
 A Cloud is a type of parallel and distributed system consisting of
a collection of interconnected and virtualized computers that are
dynamically provisioned and presented as one or more unified
computing resources based on service-level agreements
established through negotiation between the service provider and
consumers.
Definition from Berkeley
 Cloud Computing refers to both the applications delivered as
services over the Internet and the hardware and systems software
in the datacenters that provide those services.
 The services themselves have long been referred to as Software as
a Service (SaaS), so we use that term. The datacenter hardware
and software is what we will call a Cloud.
 When a Cloud is made available in a pay-as-you-go manner to the
public…… The service being sold is Utility Computing.
 One of the first milestones in cloud computing history was the
arrival of Salesforce.com in 1999, which pioneered the
concept of delivering enterprise applications via a simple
website.
 The next development was Amazon Web Services in 2002,
which provided a set of cloud-based services including storage,
computation.

 Then in 2006, Amazon launched its Elastic Compute cloud


(EC2) as a commercial web service that allows small
companies and individuals to rent computers on which to run
their own computer applications.

117
Types of Clients
 Clients are the devices that the end users interact with to manage their
information on the cloud. Clients generally fall into three categories:

• Mobile: Mobile devices include PDAs or smartphones, like a Blackberry,


Windows, Mobile Smartphone, or an iPhone.

• Thin: Clients are computers that do not have internal hard drives, but rather
let the server do all the work, but then display the information.

• Thick: This type of client is a regular computer, using a web browser like
Firefox or Internet Explorer to connect to the cloud.

17 February 2024 118


Difference between Super, Cluster, Grid
and Cloud Computing

17 February 2024 119


 Super Computing referred to one powerful computer with specialized
resources that was able to work for all users

 In Cluster Computing, a computer network with different servers, and each


user was redirected to one server

 The term Grid Computing was used to describe a heterogeneous computer


network where all devices were working together for a specific result

 In grid computing, a large project is divided among multiple computers to


make use of their resources.

 Cloud computing does just the opposite. It allows multiple smaller


applications to run at the same time

17 February 2024 120


Cloud Computing V/S Client -Server
 The major difference between client server and cloud computing is that, the server is
usually local. The employees access it over a private network. It is owned and
operated by the employer and used exclusively by the employees.

 Cloud computing is the server accessed through the internet. The servers are owned
by big companies like Google that run applications and many start-ups that provide
data storage.

 A single server in cloud is basically a virtual server, not very different from a
traditional server. However, the power of cloud comes from a server farm (many
virtual servers interconnected). Traditionally, if you need to add a new server, it will
take at least a few days. In cloud, it takes a few seconds!

 Cloud computing refers to use of virtualized infrastructure resources. On a shared


basis between multiple users(tenants) . While traditional server side computing has a
focus on using up entire hardware for a specialized function with optional multi
tenancy .
17 February 2024 121
Scalability:
1. Cloud Computing: Cloud services are designed to be scalable,
allowing users to easily scale up or down based on their needs. The
cloud provider manages the underlying infrastructure to ensure
scalability.
2. Client-Server Architecture: Scaling in a client-server architecture
may involve upgrading or adding more powerful servers. This process
is typically managed by the organization that owns and maintains the
server.
Ownership and Control:
1. Cloud Computing: Cloud resources are owned and operated by a
third-party provider. Users rely on the provider's infrastructure and
services.
2. Client-Server Architecture: Organizations have direct control over
their own servers in a client-server model. They can configure, manage,
and maintain their servers based on their specific requirements.

122
Cloud V/S Grid Computing
 Cloud Computing is for Service Oriented where as Grid Computing is for
Application Oriented. Grid computing is used to build Virtual supercomputer
using a middlerware to achieve a common task that can be shared among
several resources. A Virtual supercomputer using middleware

 Cloud computing is providing services over the internet through several


servers uses Virtualization.

 Resource Ownership and Control:


 Cloud Computing: Cloud resources are owned and operated by a third-party
service provider. Users access these resources over the internet, and the provider
manages the underlying infrastructure. Users have less direct control over the
physical infrastructure.
 Grid Computing: Resources in grid computing may belong to different
organizations or entities. Grids are designed to leverage resources from multiple
sources, and users typically have more control over the specific resources they use.
Grids often involve collaboration among different organizations.
17 February 2024 123
1. Purpose:
1. Cloud Computing: The primary purpose of cloud computing is to
provide on-demand access to computing resources for end-users or
applications. Cloud computing is more user-centric.
2. Grid Computing: Grid computing is typically used for large-scale,
data-intensive tasks that require significant processing power. Grids are
often used for research-oriented and scientific applications.
2. Flexibility and Scaling:
1. Cloud Computing: Cloud services are designed for scalability and
flexibility. Users can easily scale their resources up or down based on
demand, and the cloud provider manages the underlying infrastructure.
Cloud computing is known for its dynamic resource allocation.
2. Grid Computing: Grids are often designed for high-performance
computing and may involve more complex configurations. While grids
can scale, they are typically less dynamic than cloud environments and
may require careful coordination among participating entities.

124
3. Service Model:
1. Cloud Computing: Cloud computing offers various service models,
including Infrastructure as a Service (IaaS), Platform as a Service
(PaaS), and Software as a Service (SaaS). Users can choose the level of
abstraction they need.
2. Grid Computing: Grid computing is more focused on sharing
computing resources among different organizations. It may involve
lower-level infrastructure services and is often tailored for specific,
resource-intensive applications.

125
Figure : Grid Computing

17 February 2024 126


Cloud V/S Cluster Computing
 Cluster differs from Cloud and Grid in that a cluster is a group of computers
connected by a local area network (LAN), whereas cloud and grid are more wide
scale and can be geographically distributed.

 The components of a cluster are usually connected to each other through fast local
area networks ("LAN"), with each node (computer used as a server) running its own
instance of an operating system.

 In most circumstances, all of the nodes use the same hardware and the same
operating system, although in some setups an be geographically distributed.

 Different operating systems can be used on each computer, and/or different


hardware.

 In cluster computing, a collection of stand-alone computers are interconnected to


form a single integrated computing resource, which is able to improve performance
and availability than using a single computer.
17 February 2024 127
1. Resource Ownership and Control:
1. Cloud Computing: In cloud computing, resources are owned and
operated by a third-party service provider. Users access these resources
over the internet, and the provider manages the underlying
infrastructure. Users have limited control over the physical hardware.
2. Cluster Computing: Cluster computing involves a group of
interconnected computers that work together to perform tasks. These
clusters can be owned and controlled by a single organization, allowing
more direct control over the hardware and configuration.
2. Purpose:
1. Cloud Computing: The primary purpose of cloud computing is to
provide on-demand access to computing resources for end-users or
applications. Cloud services are often used for a wide range of tasks,
including data storage, processing, and application hosting.
2. Cluster Computing: Cluster computing is typically used for parallel
processing and high-performance computing tasks. It is well-suited for
applications that can be divided into smaller tasks that can be processed
simultaneously by different nodes in the cluster. 128
3. Scalability:
1. Cloud Computing: Cloud services are designed for scalability, allowing users
to easily scale their resources up or down based on demand. The cloud provider
manages the scaling process and the underlying infrastructure.
2. Cluster Computing: Cluster scalability often involves adding more nodes to
the cluster. While this allows for scalability, the process may require
manual intervention and configuration adjustments.
4. Service Model:
1. Cloud Computing: Cloud computing offers various service models, including
Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software
as a Service (SaaS). Users can choose the level of abstraction they need.
2. Cluster Computing: Cluster computing is more focused on providing a
platform for parallel processing and high-performance computing.
5. Accessibility:
1. Cloud Computing: Cloud services are accessed over the internet, providing
ubiquitous access to resources from anywhere with an internet connection.
2. Cluster Computing: Access to cluster resources may be limited to users
within a specific network or organization, and physical proximity of nodes is
often a consideration.
129
17 February 2024 130
How does Cloud Computing Work?

IBM Cloud Computing Reference Architecture

17 February 2024 131


 Generally, you log in to a portal (enterprise or public wise) and you order your services
through the Cloud Service Consumer. This service has been created by the cloud
service provider and can be a simple virtual machine (VM) based on an image, some
network components, an application service such as an WebApp environment and a
service such as MongoDB. It depends on the provider and type of resources and
services.

 The cloud provider will validate, through the BSS, your request and if the validation is
okay (credit card, contract), it will provision the request through the OSS.

 To be able to provide these services you will need Operational Support Services (OSS),
which will be in charge of deploying the requested service, and Business Support
Services (BSS), mainly used to validate the request and create the invoice for the
requested services.

 A cloud computing environment will also need to provide interfaces and tools for the
service creators and users. designs, implements and maintains run-time and
management artifacts specific to a cloud service.
17 February 2024 132
NIST Cloud Computing Reference Architecture

133
• Consumer: The entity that uses cloud services. Consumers can be
individuals, organizations, or systems that access and use cloud
resources.

• Provider: The entity that makes cloud resources and services


available to consumers. Providers can offer IaaS, PaaS, or SaaS.

• Broker: An intermediary that facilitates transactions between


consumers and providers. Brokers help consumers find suitable
services and negotiate terms.

• Auditor: An entity responsible for assessing and evaluating the


security, compliance, and performance of cloud services.

134
NIST Characteristics of Cloud
 On-demand self-service

 Broad network access (Internet)

 Shared / Pooled Resources

 Location independence

 Scalable and Elastic

 Measured service

17 February 2024 135


Advantages of Cloud Computing
 Lower computer costs

 Improved performance

 Reduced software costs

 Instant software updates

 Improved document format compatibility

17 February 2024 136


 Unlimited storage capacity

 Universal document access

 Latest version availability

 Easier group collaboration

 Device independence

17 February 2024 137


Disadvantages of Cloud Computing
 Requires a constant Internet connection

 Does not work well with low-speed connection

 Features might be limited

 Interoperability and integration

 Governance and Regulatory compliance

 Stored data might not be secure

 Stored data can be lost

17 February 2024 138


In Our Humble Opinion
 Central ideas
 Utility Computing
 SOA - Service Oriented Architecture

 SLA - Service Level Agreement

 Properties and characteristics


 High scalability and elasticity

 High availability and reliability

 High manageability and interoperability

 High accessibility and portability

 High performance and optimization

 Enabling techniques
 Hardware virtualization

 Parallelized and distributed computing

 Web service
Utility
Computing
SOA + SLA Central Ideas
Utility
Computing
SOA + SLA Central Ideas
 Perspective from user :
 Users do not care about how the works are done
 Instead, they only concern about what they can get
 Users do not care about what the provider actually did.
 Instead, they only concern about their quality of service

 Users do not want to own the physical infrastructure


 Instead, they only want to pay as many as they used

 What dose user really care ?


 They only care about their “Service”
Utility
Computing
SOA + SLA What Is Service?
 A service is a self-contained unit of functionality that can be accessed
and utilized by other software components. Services are designed to
be independent, modular, and reusable

 Functionalities of service :
 A service should be well-defined
 A service should be self-contained
 A service should not depend on the context or state of other services.
Utility

What Is Web Service?


Computing
SOA + SLA

 Definition :
 It is a standardized way for different software applications to communicate
with each other over the web.
 Web services enable the exchange of data between different systems,
regardless of the programming languages or platforms they are built on.
 Web service providers offer APIs that enable developers to exploit
functionality over the Internet, rather than delivering full-blown applications

 Web Services Description Language (WSDL) :


 Expressed in XML which include both data type and messages
 Four types of operations :
 One-way - Messages sent without a reply required
 Request & response - Sending and replying messages
 Solicit response - A request for a response
 Notification - Messages sent to multiple receivers
Service Oriented Architecture
 Definition
 Service Oriented Architecture (SOA) is essentially a collection of
services which communicate with each other
 These services can be independently developed, deployed, and operated,
and they communicate with each other over a network.
 SOA promotes loose coupling between services. This means that services
are independent of each other, and changes to one service do not
necessarily impact others.
 SOA emphasizes the importance of interoperability, allowing services to
communicate with each other seamlessly, even if they are implemented
using different technologies or programming languages.
 Approach
 Usually implemented by Web Service model
Quality Of Service
 Quality of Service (QoS) in the context of cloud computing refers to the
ability of a cloud service provider to deliver reliable and predictable
performance to users.

 QoS is crucial in cloud environments, where resources are shared among


multiple users and applications.

 It involves ensuring that certain performance characteristics, such as


response time, throughput, and availability, meet specified levels to
satisfy the requirements of applications and users.
1. Performance Metrics:
1. Response Time: The time it takes for a system to respond to a user
request. QoS aims to provide low and predictable response times.
2. Throughput: The amount of data transferred between the user and the
cloud service within a specific time frame. It is important for
applications with high data transfer requirements.
2. Availability:
1. Uptime: The percentage of time that a cloud service is operational and
accessible. High availability is crucial for critical applications and
services.
3. Reliability:
1. Fault Tolerance: The ability of a system to continue operating in the
event of hardware or software failures. Cloud services should be
designed with redundancy and failover mechanisms to enhance
reliability.

146
4. Scalability:
4. Elasticity: The ability of a cloud service to dynamically scale
resources up or down based on demand. This ensures that
performance remains consistent even during periods of high usage.
5. Network Performance:
1. Bandwidth: Adequate network bandwidth is essential to support data
transfer between cloud services and users. QoS measures may include
guarantees on minimum bandwidth or prioritization of certain types of
traffic.
6. Security:
1. Data Security: QoS considerations include the implementation of
security measures to protect data integrity, confidentiality, and
availability.
2. Compliance: Ensuring that the cloud service adheres to regulatory and
compliance standards relevant to the user's industry.

147
7. Resource Management:
1. Resource Allocation: Fair and efficient allocation of computing
resources among users and applications. QoS mechanisms may involve
prioritizing critical applications or users.
8. Monitoring and Reporting:
1. Performance Monitoring: Continuous monitoring of system
performance and user experience to identify and address potential issues.
2. Reporting: Providing users with reports on service performance,
downtimes, and other relevant metrics.
9. Service Level Agreements (SLAs):
1. SLA Guarantees: Cloud providers often define SLAs that specify the
guaranteed levels of performance, availability, and other QoS parameters.
Users rely on SLAs to understand the expected service quality.
10. User Experience:
1. User Satisfaction: QoS ultimately aims to ensure a positive user
experience by meeting or exceeding user expectations for system
performance and reliability.
148
Utility
Computing
SOA + SLA
Service Level Agreement
 Definition
 A service-level agreement (SLA) is a contract between a network
service provider and a customer that specifies, usually in measurable
terms (QoS), what services the network service provider will furnish.

 Common content in contract


 Performance guarantee metrics
Up-time and down-time ratio

 System throughput

 Response time

 Problem management detail


 Penalties for non-performance
 Documented security capabilities
Properties and Characteristics
Scalability & Elasticity
Scalability & Elasticity
 What is scalability?
 A desirable property of a system, a network, or a process, which
indicates its ability to either handle growing amounts of work in a
graceful manner or to be readily enlarged.

 What is elasticity?
 The ability to apply a quantifiable methodology that allows for the basis
of an adaptive introspection within a real-time infrastructure.

 But how to achieve these properties?


 Dynamic provisioning
 Multi-tenant design
Dynamic Provisioning
 What is dynamic provisioning?
 Dynamic provisioning in cloud computing refers to the automatic
allocation and scaling of computing resources based on the current
demand or workload.

 It allows cloud users to efficiently and flexibly manage their


resources by automatically adjusting the quantity of resources
available to applications or services in real-time. number of
resources available to applications or services in real-time
Dynamic Provisioning
 In traditional computing model, two common problems :
 Underestimate system utilization, which results in under-
provision.
Loss Revenue

Resources
Capacity

Demand
Resources

Capacity
1 2 3

Demand Resources Loss Users


1 2 3 Capacity
Time (days)

Demand
1 2 3
Multi-tenant Design
 What is multi-tenant design ?
 Multi-tenant refers to a principle in software architecture where a single
instance of the software runs on a server, serving multiple client
organizations.
 With a multi-tenant architecture, a software application is designed to
virtually partition its data and configuration thus each client organization
works with a customized virtual application instance.

 Client oriented requirements :


 Customization
Multi-tenant applications are typically required to provide a high
degree of customization to support each target organization's needs.
 Quality of service
 Multi-tenant applications are expected to provide adequate levels of
security and robustness.
Availability & Reliability
Availability & Reliability
 What is availability?
 The degree to which a system, subsystem, or equipment is in a
specified operable and committable state at the start of a
mission, when the mission is called for at an unknown time.
 Cloud system usually require high availability
 Ex. “Five Nines” system would statistically provide 99.999%
availability
 What is reliability?
 The ability of a system or component to perform its required
functions under stated conditions for a specified period.
 But how to achieve these properties?
 Fault tolerance system
 Require system resilience
 Reliable system security
Fault Tolerance
 What is fault tolerant system?
 Fault tolerance is the property that enables a system to continue
operating properly in the event of the failure of some of its
components.
 If its operating quality decreases at all, the decrease is
proportional to the severity of the failure, as compared to a
naively designed system in which even a small failure can cause
total breakdown.

 Four basic characteristics :


 No single point of failure
 Fault detection and isolation to the failing component
 Fault containment to prevent propagation of the failure
 Availability of reversion modes
System Resilience
 What is resilience?
 Resilience is the ability to provide and maintain an acceptable
level of service in the face of faults and challenges to normal
operation.
 Resiliency pertains to the system's ability to return to its
original state after encountering trouble. In other words, if a
risk event knocks a system offline, a highly resilient system will
return to work and function as planned as soon as possible.

 Some risk events


 If power is lost at a plant for two days, can our system recover ?
 If a key service is lost because a database corruption, can the
business recover?
System Resilience
 Disaster Recovery
 Disaster recovery is the process, policies and procedures related to
preparing for recovery or continuation of technology infrastructure
critical to an organization after a natural or human-induced disaster.

 Some common strategies :


 Backup
 Make data off-site at regular interval
 Replicate data to an off-site location

 Replicate whole system

 Preparing
 Local mirror systems

 Surge protector

 Uninterruptible Power Supply (UPS)


System Security
 Security issue in Cloud Computing :
 Cloud security is an evolving sub-domain of computer
security, network security, and, more broadly, information
security.
 It refers to a broad set of policies, technologies, and controls
deployed to protect data, applications, and the associated
infrastructure of cloud computing.
System Security
 Important security and privacy issues :
 Data Protection
 To be considered protected, data from one customer must be
properly segregated from that of another.
 Identity Management
 Every enterprise will have its own identity management system to
control access to information and computing resources.
 Application Security
 Cloud providers should ensure that applications available as a
service via the cloud are secure.
 Privacy
 Providers ensure that all critical data are masked and that only
authorized users have access to data in its entirety.
Manageability & Interoperability
Manageability & Interoperability
 What is manageability?
 Enterprise-wide administration of cloud computing
systems. Systems manageability is strongly influenced by
network management initiatives in telecommunications.
 What is interoperability?
 Interoperability is a property of a product or system, whose
interfaces are completely understood, to work with other
products or systems, present or future, without any restricted
access or implementation.
 But how to achieve these properties?
 System control automation
 System state monitoring
 Billing System in Cloud
 Users pay as many as they used.
 Cloud provider must first determine the list of service usage
price.
 Cloud providers must record the resource or service usage of each
user, and then charge users by these records.
 How can cloud provider know users’ usage ?
 Get those information by means of monitoring system.
 Automatically calculate the total
amount of money which user
should pay. And automatically
request money from use’s banking
account.
Performance & Optimization
Performance & Optimization
 Performance guarantees??
 As the great computing power in cloud, application
performance should be guaranteed.
 Cloud providers make use of powerful infrastructure or
other underlining resources to build up a highly performed
and highly optimized environment, and then deliver the
complete services to cloud users.

 But how to achieve this property?


 Parallel computing
 Load balancing
 Job scheduling
Benefits From Cloud
 Cloud computing brings many benefits :
 For the market and enterprises
 Reduce initial investment
 Reduce capital expenditure
 Improve industrial specialization
 Improve resource utilization
 For the end user and individuals
 Reduce local computing power
 Reduce local storage power
 Variety of thin client devices in daily life
Choose the service you need.
Service Models Overview
 What if you want to have an IT department ?
 Similar to build a new house in previous analogy
 You can rent some virtualized infrastructure and build up your own IT
system among those resources, which may be fully controlled.
 Technical speaking, use the Infrastructure as a Service (IaaS) solution.

 Similar to buy an empty house in previous analogy


 You can directly develop your IT system through one cloud platform,
and do not care about any lower level resource management.
 Technical speaking, use the Platform as a Service (PaaS) solution.

 Similar to live in a hotel in previous analogy


 You can directly use some existed IT system solutions, which were
provided by some cloud application service provider, without knowing
any detail technique about how these service was achieved.
 Technical speaking, use the Software as a Service (SaaS) solution.
Service Model Overview
Infrastructure as a Service
Platform as a Service
Software as a Service
Infrastructure as a Service
 Infrastructure as a Service - IaaS
 The capability provided to the consumer is to provision processing,
storage, networks, and other fundamental computing resources where
the consumer is able to deploy and run arbitrary software, which can
include operating systems and applications.

 The consumer does not manage or control the underlying cloud


infrastructure but has control over operating systems, storage,
deployed applications, and possibly limited control of select networking
components .
 Examples :
 Amazon EC2
 Eucalyputs
 OpenNebula etc.
Infrastructure as a Service
 System architecture :
Infrastructure as a Service
 Enabling technique - Virtualization
 Virtualization is an abstraction of logical resources away from
underlying physical resources.
 Virtualization technique shift OS onto hypervisor.

 Multiple OS share the physical hardware and provide different


services.
 Improve utilization, availability, security and convenience.
Infrastructure as a Service

 Properties supported by virtualization technique :


 Manageability and Interoperability
 Availability and Reliability
 Scalability and Elasticity
Infrastructure as a Service
 Provide service –Resource Management Interface
 Several types of virtualized resource :
 Virtual Machine – As an IaaS provider, we should be able to provide
the basic virtual machine operations, such as creation, suspension,
resumption and termination, …etc.

 Virtual Storage – As an IaaS provider, we should be able to provide


the basic virtual storage operations, such as space allocation, space
release, data writing and data reading, …etc.

 Virtual Network – As an IaaS provider, we should be able to provide


the basic virtual network operations, such as IP address allocation,
domain name register, connection establishment and bandwidth
provision, …etc.
Infrastructure as a Service
 Provide service – System Monitoring Interface
 Several types of monitoring metrics :
 Virtual Machine – As an IaaS provider, we should be able to
monitor some system states of each virtual machine, such as CPU
loading, memory utilization, IO loading and internal network
loading, …etc.
 Virtual Storage – As an IaaS provider, we should be able to
monitor some storage states of each virtual storage, such as virtual
space utilization, data duplication and storage device access
bandwidth, …etc.
 Virtual Network – As an IaaS provider, we should be able to
monitor some network states of each virtual network, such as
virtual network bandwidth, network connectivity and network load
balancing, …etc.
IaaS - Summary

 IaaS is the deployment platform that abstract the infrastructure.

 IaaS enabling technique


 Virtualization
 Server Virtualization
 Storage Virtualization
 Network Virtualization

 IaaS provided services


 Resource Management Interface
 System Monitoring Interface
Infrastructure as a Service
Platform as a Service
Software as a Service
Platform as a Service
 Platform as a Service - PaaS
 The capability provided to the consumer is to deploy onto the
cloud infrastructure consumer-created or acquired applications
created using programming languages and tools supported by the
provider.
 The consumer does not manage or control the underlying cloud
infrastructure including network, servers, operating systems, or
storage, but has control over the deployed applications and
possibly application hosting environment configurations.
 Examples :
 Microsoft Windows Azure
 Google App Engine
 Hadoop
 … etc
Platform as a Service
 System architecture :
Platform as a Service
 Enabling technique – Runtime Environment Design
 Runtime environment refers to the collection of
software services available. Usually implemented by a
collection of program libraries.

 Common properties in Runtime Environment :


 Manageability and Interoperability
 Performance and Optimization
 Availability and Reliability
 Scalability and Elasticity
Platform as a Service
 Provide service – Programming IDE
 Users make use of programming IDE to develop their
service among PaaS.
 This IDE should integrate the full functionalities which
supported from the underling runtime environment.
 This IDE should also provide some development tools, such as
profiler, debugger and testing environment.

 The programming APIs supported from runtime


environment may be various between different cloud
providers, but there are still some common operating
functions.
 Computation, storage and communication resource operation
Platform as a Service

 Provide service – System Control Interface


 Police-Based Control
 Typically described as a principle or rule to guide decisions
and achieve rational outcome(s)
 Make the decision according to some requirements

 Workflow Control
 Describe the flow of installation and configuration of
resources
 Workflow processing daemon delivers speedy and efficient
construction and management of cloud resources
PaaS - Summary
 PaaS is the development platform that abstract the infrastructure,
OS, and middleware to drive developer productivity.

 PaaS enabling technique


 Runtime Environment

 PaaS provide services


 Programming IDE
 Programming APIs
 Development tools
 System Control Interface
 Policy based approach
 Workflow based approach
Infrastructure as a Service
Platform as a Service
Software as a Service
Software as a Service
 Software as a Service - SaaS
 The capability provided to the consumer is to use the provider’s
applications running on a cloud infrastructure. The applications
are accessible from various client devices through a thin client
interface such as a web browser (e.g., web-based email).
 The consumer does not manage or control the underlying cloud
infrastructure including network, servers, operating systems,
storage, or even individual application capabilities, with the
possible exception of limited user-specific application
configuration settings.
 Examples :
 Google Apps (e.g., Gmail, Google Docs, Google sites, …etc)
 SalesForce.com
 EyeOS
Software as a Service
Software as a Service
 Enabling Technique – Web Service
 Web 2.0 is the trend of using the full potential of the
web
 Viewing the Internet as a computing platform
 Running interactive applications through a web browser
 Leveraging interconnectivity and mobility of devices
 Enhanced effectiveness with greater human participation
 Properties provided by Internet :
 Accessibility and Portability
Software as a Service
 Provide service – Web-based Applications
 Conventional applications should translate their access interface onto
web-based platform.
 Applications in different domains
 General Applications – Applications which are designed for general
propose, such as office suit, multimedia and instant message, …etc.
 Business Applications – Application which are designed for business
propose, such as ERP, CRM and market trading system, …etc.
 Scientific Applications – Application which are designed for
scientific propose, such as aerospace simulation and biochemistry
simulation, …etc.
 Government Applications – Applications which are designed for
government propose, such as national medical system and public
transportation system service, …etc.
Software as a Service
 Provide service – Web Portal
 Apart from the standard search engine feature, web portals
offer other services such as e-mail, news, stock prices,
information, databases and entertainment.
 Portals provide a way for enterprises to provide a consistent
look and feel with access control and procedures for
multiple applications and databases, which otherwise would
have been different entities altogether.
 Some examples :
 iGoogle
 MSNBC
 Netvibes
 Yahoo!
SaaS - Summary
 SaaS is the finished applications that you rent and customize.

 SaaS enabling technique


 Web Service

 SaaS provide services


 Web-based Applications
 General applications
 Business applications
 Scientific applications
 Government applications
 Web Portal
How to deploy a cloud system ?
Deployment Model

 There are four primary cloud deployment models :


 Public Cloud
 Private Cloud
 Community Cloud
 Hybrid Cloud

 Each can exhibit the previously discussed characteristics;


their differences lie primarily in the scope and access of
published cloud services, as they are made available to
service consumers.
Public Cloud
 Public cloud definition
 The cloud infrastructure is made available to the general
public or a large industry group and is owned by an
organization selling cloud services.
 Also known as external cloud or multi-tenant cloud, this
model essentially represents a cloud environment that is
openly accessible.
 Basic characteristics :
 Common policies
 Shared resources and multi-tenant
 Leased or rented infrastructure
 Economies of scale
Private Cloud
 Private cloud definition
 The cloud infrastructure is operated solely for an organization. It may be
managed by the organization or a third party and may exist on premise
or off premise.

 Also referred to as internal cloud or on-premise cloud, a private cloud


intentionally limits access to its resources to service consumers that
belong to the same organization that owns the cloud.

 Basic characteristics :
 Heterogeneous or homogeneous infrastructure
 Customized policies
 Dedicated resources
 In-house infrastructure
 End-to-end control on-premise or off-premise
Public vs. Private
 Comparison :

Public Cloud Private Cloud


Policy Model Common defined Customized
Resource
Shared & Multi-tenant Dedicated
Model
Cost Model Operational expenditure Capital expenditure
Economy
Large economy of scale End-to-end control
Model
Community Cloud
 Community cloud definition
 The cloud infrastructure is shared by several
organizations and supports a specific community that
has shared concerns (e.g., mission, security
requirements, policy, and compliance considerations).
Hybrid Cloud
 Hybrid cloud definition
 The cloud infrastructure is a composition of two or more
clouds (private, community, or public) that remain unique
entities but are bound together by standardized or
proprietary technology that enables data and application
portability (e.g., cloud bursting for load-balancing between
clouds).
Cloud Ecosystem
Summary
 What is cloud computing in your mind
 Clear or Cloudy?

 Cloud computing is a new paradigm shift of computing


 Cloud computing can provide high quality of properties
and characteristics based on essentially central ideas

 Service models and deployment models provide services


that can be used to
 Rent fundamental computing resources
 Deploy and develop customer-created applications on clouds
 Access provider’s applications over network (wired or
wireless)
Unit-2
Virtualization
Virtualization concepts - Types of Virtualization, Introduction to
Various Hypervisors, Moving VMs, Pros and cons of
virtualization, Virtualization Technology examples. Distributed
Management of Virtual Infrastructures, Scheduling, Capacity
Management to meet SLA Requirements, Various load balancing
techniques.

209
Virtualization
 A simple definition of the virtualization is the formation of virtual computer
inside real computer. It is a abstraction layer above the hardware laye.

 The idea of virtualization is not new. It was introduced by IBM in 1960 when
mainframe computers were in use. Main frame computers were underutilized
most of the time, hence to amplify the resource utilization of these main frame
computers virtualization technology was invented which allows to run many
OS simultaneously.

 Due to the invention of desktop and reduction in hardware price this


technology became dormant for long time.

 But over the past few decades with the invention of new technology like
utility computing and cloud computing once again virtualization became so
popular.
17 February 2024 210
 It allows to run several OS concurrently on a single PM. In other words, it
divides the physical hardware into the multiple segments and each segment
can be operated independently.

17 February 2024 211


Hypervisor
 A hypervisor is a program that would enable you to host several different virtual
machines on a single hardware.

 Each one of these virtual machines or operating systems you have will be able
to run its own programs, as it will appear that the system has the host hardware's
processor, memory and resources. In reality, however, it is actually the
hypervisor that is allocating those resources to the virtual machines.

 In effect, a hypervisor allows you to have several virtual machines all working
optimally on a single piece of computer hardware.

 Now, hypervisors are fundamental components of any virtualization effort. You


can think of it as the operating system for virtualized systems. It can access all
physical devices residing on a server. It can also access the memory and disk. It
can control all aspects and parts of a virtual machine.

17 February 2024 212


Virtual Machine, Guest Operating System,
and VMM (Virtual Machine Monitor)

The Virtualization layer is the middleware between the


underlying hardware and virtual machines represented in the
system, also known as virtual machine monitor (VMM) or
hypervisor.

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 213


Virtual Machines
 VM technology allows multiple virtual machines to run on a
single physical machine.
App App App App App
Xen
Guest OS Guest OS Guest OS
(Linux) (NetBSD) (Windows)
VMWare
VM VM VM
UML
Virtual Machine Monitor (VMM) / Hypervisor

Denali
Hardware
etc.

17 February 2024 214


(Courtesy of VMWare, 2008)

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 215


Types of Hypervisors
1) Bare metal, native or type I hypervisors
 These hypervisors run on the top of physical hardware of the system.
Guest OS and applications run on the hypervisor.
 Example: Microsoft Hyper-V hypervisor, VMware ESX/ESXi, Oracle
VM Server for x86, KVM, or Citrix XenServer
 A major advantage is that any problems in one virtual machine or guest
operating system do not affect the other guest operating systems
running on the hypervisor.

17 February 2024 216


2) Embedded, hosted or type II hypervisors
 These hypervisors run within a host OS. That means type- 2 hypervisor
run as an application on the host OS.
 It is completely dependent on host Operating System for its operations
 While having a base operating system allows better specification of
policies, any problems in the base operating system affects the entire
system as well even if the hypervisor running above the base OS is
secure.
 Example: Vmware Workstation, Microsoft Virtual PC, Oracle Virtual Box

17 February 2024 217


 So, native hypervisors run directly on the hardware while a hosted hypervisor
needs an operating system to do its work. Which one is better? It depends on
what you're after.

 Bare metal hypervisors are faster and more efficient as they do not need to go
through the operating system and other layers that usually make hosted
hypervisors slower. Type I hypervisors are also more secure than type II
hypervisors.

 Hosted hypervisors, on the other hand, are much easier to set up than bare
metal hypervisors because you have an OS to work with. These are also
compatible with a broad range of hardware.

 A hypervisor is a natural target for hackers because its designed control all the
resources of the hardware while managing all the virtual machines residing on
it. The bad news is that a hypervisor is vulnerable to a lot of malicious code,
especially those coming from an unmanaged virtual machine.

17 February 2024 218


Virtualization Ranging from Hardware to
Applications in Five Abstraction Levels
Virtualization at ISA (Instruction Set Architecture) level:
ing a given ISA by the ISA of the host machine.
• e.g, MIPS binary code can run on an x-86-based host machine with the help
of ISA emulation.
• Typical systems: Bochs, Crusoe, Quemu, BIRD, Dynamo
Advantage:
• It can run a large amount of legacy binary codes written for various
processors on any given new hardware host machines
• best application flexibility
Shortcoming & limitation:
• One source instruction may require tens or hundreds of native target
instructions to perform its function, which is relatively slow.
• V-ISA requires adding a processor-specific software translation layer in
the complier. Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 220
Virtualization at Hardware Abstraction level:
Virtualization is performed right on top of the hardware.
• It generates virtual hardware environments for VMs, and manages the
underlying hardware through virtualization.
• Typical systems: VMware, Virtual PC, Denali, Xen

Advantage:
• Has higher performance and good application isolation
Shortcoming & limitation:
• Very expensive to implement (complexity)

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 221


Virtualization at Operating System (OS) level:
It is an abstraction layer between traditional OS and user placations.
• This virtualization creates isolated containers on a single physical
server and the OS-instance to utilize the hardware and software in
datacenters.
• Typical systems: Jail / Virtual Environment / Ensim's VPS / FVM

Advantage:
• Has minimal starup/shutdown cost, low resource requirement, and high
scalability;
Shortcoming & limitation:
• All VMs at the operating system level must have the same kind of guest
OS
• Poor application flexibility and isolation.

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 222


Virtualization at OS Level

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 223


VM v/s Containers
 Hypervisor-based virtualization technologies emulate the hardware; you
can run any operating system on top of any other, Windows on Linux, or the
other way around.
 Both the guest operating system and the host operating system run with their
own kernel and the communication of the guest system with the actual
hardware is done through an abstracted layer of the hypervisor.

224
 This approach usually provides a high level of isolation and security as all
communication between the guest and host is through the hypervisor.

 This approach is also usually slower and incurs significant performance


overhead due to the hardware emulation.

Containers
 Containers are the products of operating system virtualization. They
provide a lightweight virtual environment that groups and isolates a set
of processes and resources such as memory, CPU, disk, etc., from the host
and any other containers.

 The isolation guarantees that any processes inside the container cannot see
any processes or resources outside the container.

225
 Containers can be OS containers and application containers.

 OS containers are virtual environments that share the kernel of the host
operating system but provide user space isolation.
 Container technologies like LXC, OpenVZ, Linux VServer, BSD Jails and
Solaris zones are all suitable for creating OS containers.

 While OS containers are designed to run multiple processes and services,


application containers are designed to package and run a single service.
 Container technologies like Docker and Rocket are examples of application
containers.

226
227
Virtualization for Linux and Windows NT
Platforms

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 228


Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 229
Advantages of OS Extension for Virtualization

1. VMs at OS level has minimum startup/shutdown costs

2. OS-level VM can easily synchronize with its environment

Disadvantage of OS Extension for Virtualization

 All VMs in the same OS container must have the same or similar
guest OS, which restrict application flexibility of different VMs on
the same physical machine.

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 230


Library Support level:
It creates execution environments for running alierather
than creating VM to run the entire operating system.
• It is done by API call interception and remapping.
• Typical systems: Wine, WAB, LxRun , VisualMainWin

Advantage:
• It has very low implementation effort

Shortcoming & limitation:


• poor application flexibility and isolation

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 231


Virtualization with Middleware/Library Support

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 232


The vCUBE for Virtualization of GPGPU

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 233


User-Application level:
ualizes an application as a virtual machine.
• This layer sits as an application program on top of an operating
system and exports an abstraction of a VM that can run
programs written and compiled to a particular abstract machine
definition.
• Typical systems: JVM , NET CLI , Panot

Advantage:
• has the best application isolation

Shortcoming & limitation:


• low performance, low application flexibility and high
implementation complexity.

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 234


More Xs mean higher merit

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 235


Fault Tolerance
 Fault Tolerance alludes to a methodology to system design that permits a
system to keep performing actually when one of its parts falls flat or it can
be defined as capacity of a system to react nimbly to an unexpected
equipment or programming break down.

 If not fully operational, fault tolerance solutions may allow a system to


continue operating at reduced capacity rather than shutting down completely
following a failure

 Cloud is prone to faults and they can be of different types. Various fault
tolerance techniques can be used at either task level or workflow level to
resolve the faults

17 February 2024 236


Fault Tolerance Techniques
1) Reactive fault tolerance
Reactive fault tolerance techniques are used to reduce the impact of failures on
a system when the failures have actually occurred. Techniques based on this
policy are checkpoint/Restart and retry and so on.

i. Check pointing/Restart-
• The failed task is restarted from the recent checkpoint rather than from
the beginning. It is an efficient technique for large applications.

ii. Replication:
• In order to make the execution succeed, various replicas of task are run
on different resources until the whole replicated task is not crashed.
HAProxy, Haddop and AmazonEc2 are used for implementing
replication.

17 February 2024 237


Job migration:
iii.
• On the occurrence of failure, the job is migrated to a new machine.
HAProxy can be used for migrating the jobs to other machines.

iii.Retry:
• This task level technique is simplest among all. The user resubmits the task
on the same cloud resource.

iv. Task Resubmission:

• The failed task is submitted again either to the same machine on which it
was operating or to some other machine.

17 February 2024 238


2) Proactive Fault Tolerance:
• Proactive fault tolerance predicts the faults proactively and replace the suspected
components by other working components thus avoiding recovery from faults
and errors. Preemptive migration, software rejuvenation etc. follow this policy.

i. Proactive Fault Tolerance using Preemptive Migration:


• In this technique an application is constantly observed and analyzed. Preemptive
migration of a task depends upon feed-back-loop control mechanism.

ii. Software Rejuvenation:


• It is a proactive approach to prevent or mitigate the occurrence of software
failures caused by factors such as memory leaks, resource exhaustion, or
degradation of system performance over time. The primary goal of software
rejuvenation is to enhance the reliability and availability of a system by
periodically restarting or refreshing its software components.

17 February 2024 239


Monolithic Vs. Microkernel
Hypervisor Architecture
 Both monolithic and microkernel architectures are associated with Type 1
hypervisors, but they host guests and allocate resources to support their
workloads in different ways. VMware uses a monolithic architecture and
Hyper-V uses a microkernel architecture.

Microkernel: Its includes only basic and unchangeable functionality which


not change with time.
 Ex. Memory management, process management, processor scheduling
 Xen

Monolithic: It includes all changeable and unchangeable functionality.


Ex. Device driver, Memory management, process management, processor
scheduling.
Vmware, ESX server 240
The XEN Architecture

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 241


The XEN Architecture

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 242


The XEN Architecture

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 243


Traditional CPU Level Classification
 Privileged and non-privileged instructions
 The instruction set is usually divided into two kinds of instructions, which
are non-privileged and privileged instructions. Non-privileged does not
change the value or state of shared resources.

 Shared resources include processor, memory, timer, and registers of special


purposes. Non-privileged instructions include arithmetic instructions logic
instructions, and so on.

 Privileged instructions are all used to access the value or state of shared
resources including shutdown, set the timer, set the program counter, change
the value of the relocation register and instructions associated with I/O

 Non-privileged instructions can be directly executed by VMM, while the


privileged instructions require simulation execute.
17 February 2024 244
x86 Hardware Virtualization
 The x86 architecture offers four levels of privilege known as Ring 0, 1, 2
and 3 to operating systems and applications to manage access to the
computer hardware. While user level applications typically run in Ring 3,
the operating system needs to have direct access to the memory and
hardware and must execute its privileged instructions in Ring 0.

17 February 2024 245


Technique 1: Full Virtualization using
Binary Translation
 This approach relies on binary translation to trap (into the VMM) and to
virtualize certain sensitive and non-virtualizable instructions with new
sequences of instructions that have the intended effect on the virtual
hardware. Meanwhile, user level code is directly executed on the processor
for high performance virtualization.

17 February 2024 246


 This combination of binary translation and direct execution provides Full
Virtualization as the guest OS is completely decoupled from the underlying
hardware by the virtualization layer.

 The guest OS is not aware it is being virtualized and requires no


modification.

 The hypervisor translates all operating system instructions at run-time on


the fly and caches the results for future use, while user level instructions run
unmodified at native speed.

 VMware’s virtualization products such as VMWare ESXi and Microsoft


Virtual Server are examples of full virtualization.

17 February 2024 247


 The performance of full virtualization may not be ideal because it involves
binary translation at run-time, which is time-consuming and can incur a
large performance overhead.

 Binary translation employs a code cache to store translated hot instructions


to improve performance, but it increases the cost of memory usage.

 The performance of full virtualization on the x86 architecture is typically


80% to 97% that of the host machine.

17 February 2024 248


Technique 2: OS Assisted Virtualization
or Paravirtualization (PV)
 Paravirtualization is virtualization in which the guest operating system (the
one being virtualized) is aware that it is a guest and accordingly has drivers
that, instead of issuing hardware commands, simply issues commands
directly to the host operating system. This will include things such as
memory management as well.

 Paravirtualization involves modifying the OS kernel to replace


nonvirtualizable instructions with hypercalls that communicate directly with
the virtualization layer hypervisor.

 Paravirtualization refers to communication between the guest OS and the


hypervisor to improve performance and efficiency.
17 February 2024 249
 The hypervisor also provides hypercall interfaces for other critical kernel
operations such as memory management, interrupt handling and time keeping.

 A para-virtualization hypervisor does not need large amounts of processing


power to manage guest operating systems because of this, as each OS is already
aware of the demands placed on the physical server.

 As paravirtualization cannot support unmodified operating systems (e.g.


Windows 2000/XP), its compatibility and portability is poor.
17 February 2024 250
Technique 3: Hardware Assisted
Virtualization (HVM)
 Hardware Assisted Virtualization is a type of Full Virtualization where the
microprocessor architecture has special instructions to aid the virtualization
of hardware. These instructions might allow a virtual context to be setup so
that the guest can execute privileged instructions directly on the processer,
even though it is virtualized.

 Privileged and sensitive calls are set to automatically trap to the hypervisor
and handled by hardware, removing the need for either binary translation or
para-virtualization.

17 February 2024 251


 Privileged and sensitive calls are set to automatically trap to the hypervisor
and handled by hardware, removing the need for either binary translation or
para-virtualization.

17 February 2024 252


Hardware Support for Virtualization
in the Intel x86 Processor

• 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. This enhancement traps all sensitive
instructions in the VMM automatically.
• 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.

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 253


VMWare ESX Server for Para-
Virtualization

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 254


Major VMM and Hypervisor Providers

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 255


CPU Virtualization
The critical instructions are divided into three categories:

• Privileged instructions,
• Privileged instructions execute in a privileged mode and will
be trapped if executed outside this mode.

• Control sensitive instructions, and


• Control-sensitive instructions attempt to change the
configuration of resources used.

• Behavior-sensitive instructions.
• Behavior-sensitive instructions have different behaviors
depending on the configuration of resources, including the
load and store operations over the virtual memory

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 256


x86 Hardware Virtualization

17 February 2024 257


CPU Virtualization
 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 supervisor mode.

 When the privileged instructions including control- and behavior-sensitive


instructions of a VM are executed, they are trapped in the VMM. In this
case, the VMM acts as a unified mediator for hardware access from
different VMs to guarantee the correctness and stability of the whole
system.

 However, not all CPU architectures are virtualizable.


 RISC CPU architectures can be naturally virtualized because all control-
and behavior-sensitive instructions are privileged instructions.
 On the contrary, x86 CPU architectures are not primarily designed to
support virtualization.
Hardware-Assisted CPU Virtualization
 This technique attempts to simplify
virtualization because full or para-
virtualization is complicated.
 Intel and AMD add an additional
mode called privilege mode level
(some people call it Ring-1) to x86
processors.
 Therefore, operating systems can still
run at Ring 0 and the hypervisor can
run at Ring -1.
Intel Hardware-Assisted CPU Virtualization

*All the privileged and sensitive instructions are trapped in the hypervisor automatically. This technique removes
the difficulty of implementing binary translation of full virtualization. It also lets the operating system run in VMs
without modification.
Memory Virtualization
 In a traditional Operating system maintains mappings of virtual memory to
machine memory using page tables, which is a one-stage mapping from
virtual memory to machine memory.

 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, virtual memory to physical memory and physical memory to
machine memory.

 MMU virtualization should be supported, which is transparent to the guest


OS. The guest OS continues to control the mapping of virtual addresses to
the physical memory addresses of VMs
Two-level memory mapping procedure.
Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 262
I/O Virtualization
 I/O virtualization involves managing the routing of I/O
requests between virtual devices and the shared physical
hardware.
 There are three ways to implement I/O virtualization:
 full device emulation,
 para-virtualization, and
 direct I/O.
 Full device emulation is the first approach for I/O
virtualization. Generally, this approach emulates well-
known, real-world devices.
Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 264
Conclusions on CPU, Memory and I/O
Virtualization :
 CPU virtualization demands hardware-assisted traps of
sensitive instructions by the VMM

 Memory virtualization demands special hardware support


(shadow page tables by VMWare or extended page table by
Intel) to help translate virtual address into physical address
and machine memory in two stages.

 I/O virtualization is the most difficult one to realize due to


the complexity if I/O service routines and the emulation
needed between the guest OS and host OS.

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 265


Virtual Cores vs. Physical Processor Cores

Physical cores Virtual cores


The actual physical cores present in the There can be more virtual cores
processor. visible to a single OS than there are
physical cores.
Hardware provides no assistance to the Hardware provides assistance to the
software and is hence simpler. software and is hence more complex.

Poor resource management. Better resource management.


More burden on the software to write Design of software becomes easier as
applications which can run directly on the hardware assists the software in
the cores. dynamic resource utilization.

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 266


Multi-Core Virtualization:
VCPU vs. traditional CPU

Figure 3.16 Four VCPUs are exposed to the software, only three cores are actually
present. VCPUs V0, V1, and V3 have been transparently migrated, while VCPU V2
has been transparently suspended. (Courtesy of Wells, et al., “Dynamic
Heterogeneity and the Need for Multicore Virtualization”, ACM SIGOPS Operating
Systems Review, ACM Press, 2009 [68] )

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 267


(Courtesy of Marty and Hill, 2007)

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 268


Virtual Clusters in Many Cores
Space Sharing of VMs -- Virtual Hierarchy

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 269


Virtual Cluster Characteristics
 The virtual cluster nodes can be either physical or virtual machines. Multiple VMs

running with different OSs can be deployed on the same physical node.

 A VM runs with a guest OS, which is often different from the host OS, that manages the resources
in the physical machine, where the VM is implemented.

 The purpose of using VMs is to consolidate multiple functionalities on the same server. This will
greatly enhance the server utilization and application flexibility.

 VMs can be colonized (replicated) in multiple servers for the purpose of promoting distributed
parallelism, fault tolerance, and disaster recovery.

 The size (number of nodes) of a virtual cluster can grow or shrink dynamically, similarly to the
way an overlay network varies in size in a P2P network.

 The failure of any physical nodes may disable some VMs installed on the failing nodes. But the
failure of VMs will not pull down the host system.
Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 270
Virtual Clusters vs. Physical Clusters

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 271


Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 272
273
Critical Issues in Cloud Computing
Server
consolidation

Hotspot mitigation

Resource Leakages

Load Balancing

Security
Server Consolidation
 In cloud computing many PM having low-resource-usage VMs.
 VMs on lightly loaded hosts can be “Packed” onto fewer machines to meet
resource requirements.
 The freed-up PMs can either be switched off (to save power) or represent
higher-resource availability bins for new VMs.
Hotspot Mitigation
 Changes in workload conditions of VMs can lead to “hot spots” —not
enough resources provisioned to meet demand —or “cold spots” —
provisioned resources are not utilized efficiently

 Under such conditions, additional resources can be allocated either locally


(on the same PM) or within the set of PMs available for provisioning

 When local resources are not sufficient to remove the hot spot, VMs can be
migrated to another host to make the resources required available to
mitigate the hot spot
Load Balancing
 It is a process that distribute the dynamic load evenly across all the node in
the cloud, simultaneously removing a condition in which some of the nodes
are over loaded while some others are under loaded.

 Virtual machine Migration are use to balance load in the cloud.


Energy Consumption
 Energy efficient resource management has become a significant concern
in virtualized data centers to reduce operational costs and extend
systems’ lifetime. The opportunity of reducing energy can be achieved by
using Dynamic Voltage Frequency Scaling (DVFS) and hosts consolidation.

 There is a nonlinear relationship between the number of processes used and power
consumption.
180
170
160
150
140
Watts

130
120
110
100
90
0 1 2 3 4 5 6 7 8
Number of Processing Cores
Resource Leakage
 Resource leakage is the one of the major issue in cloud computing. It is
define as a amount of resources that can’t be allocated to any VM.

 Resources in cloud are multi dimensional (CPU, memory, bandwidth etc.).


So there may be a situation where resources in one dimension is overloaded
while in other dimension is under utilize.

17 February 2024 279


Virtual Machine Migration
 Migration is the process of transferring the state (all memory pages
and CPU state) of a VM from one physical machine to another PM.

 Migration are used to handle the condition such as Sever


consolidation, load balance and Hotspot mitigation

 Migration process effect the system performance


(1) Source PM Selection
 Generally, lower and upper thresholds are used to decide when the virtual
machine migration process should be started. A system is called overloaded
when the load on the system crosses the upper threshold. Similarly, a system
is called underloaded when the load on the system is below the lower
threshold. Virtual machines are mostly migrated in three different situations.

 Static and dynamic threshold can be used for the migration

1) To balance the load on the physical machine. Some VM are migrated from
overloaded PM to underloaded PM.
2) In the case of server consolidation, all the VM inside the underloaded PM
are migrated to the other host, to increase the resource utilization and
reduce the energy consumption.
3) To mitigate the hot spot.
(2) Selecting the candidate VM
 Which VM is selected for the migration depends on the situation, i.e., load
balancing, server consolidation, and hot spot mitigation.

 In the case of server consolidation, all the VMs available on the host have to be
selected for the migration.
 VM selection in the case of hot spot and load balancing is a complicated task,
because if light weight VM is chosen than, number of VM has to be migrated
and if we choose weighted VM then it will increase the total migration time.
Numbers of approaches have been used for selecting the VM.

 T. Wood et al. used a volume-to-size ratio (VSR) to select the VM. When
the hot spot is detected one or more VM is moved from this PM to another
PM. VM which is having highest VSR is selected as a candidate VM, where
volume is corresponding to the load of the VM and size is the memory
footprint of the VM.
282
 A. Beloglazov et al., proposed a method for load balancing, they select the
VM whose size is greater than or equal to the (host utilization-upper
threshold). If K is the selected VM, then
Size of VM >= host utilization −− upper threshold

 If no such VM found then the number of VM will be migrated.

283
(3) Choosing the target physical machine
 Placing a VM on the appropriate host play a vital role in VM migration
because resource utilization can be increased and power consumed by the
data centers can be reduced by the efficient VM placement algorithm.

 After selecting the VM which has to be migrated, next step is to calculate


the resource requirement of the virtual machine and then find the
appropriate physical machine that can fulfill the individual resource
requirement of the candidate virtual machine.

 Y. Fang et al. give equal weight to all the resources. They simply calculate
the load on the host by adding the load of the VM available in the PM.

284
 M.Mishra et al. give different weights to each resource by using the
weighting coefficient (Wi). The following equation is used to calculate the
load on the kth host

 M.Mishra et al., proposed a vector method for placing a VM. In the VectorDot
method they are using dot product between the source utilization of physical
machine and resource requirement of virtual machine to choose the target physical
machine.
 For the proper utilization of the resources it is necessary that the virtual machine which
required more CPU and less memory should be placed on the physical machine which has
low CPU and more memory utilization

285
4.Methods for transferring the VM
 In order to resume running the migrated VM on the new host,
the states of VM’s physical memory, network connection,
file system and other resources should be migrated. The
most complicated issue is migrating physical memory,
because the content of memory is dynamic and it is a main
factor that affects the migration performance.

 Down time and Total migration time are two issues which is
considered during the migration
287
1) Suspended and Copy
In this approach stop the virtual machine on the source PM, copy all
memory pages and CPU states to the destination PM, and then resume
the VM on the destination PM.

Problem
 Minimizes total migration time, the downtime is proportional to the
“size” of the VMs and network resources available for state transfer

288
2) Pre-Copy approach (Live migration)

 It’s an iterative method of the live migration.

 In the first round all memory pages and CPU states are transferred to the
destination physical machine. Since virtual machine still run on the source
virtual machine, so during the transmission some memory pages are
modified.
 These modified pages are called dirty page. Set of dirty pages is called
writable working set (WWS). Set of dirty pages in the previous round are
transferred into the next round.

 This process is repeated until the size of WWS is reduced to the predefine
maximum allowable window size say 1MB or the predefined maximum
number of iteration, then stop the virtual machine on the source PM and
transfer all memory pages and CPU states to the destination physical
machine, then start the virtual machine on the destination PM.
290
Problem
 Minimum download time and high total migration time.

291
Effect on data transmission rate of a VM
migrated from one failing web server to
another.

292
Memory Migration
 The Internet Suspend-Resume (ISR) technique exploits temporal locality as
memory states.

 Temporal locality refers to the fact that the memory states differ only by the
amount of work done since a VM was last suspended before being initiated
for migration.

 To exploit temporal locality, each file in the file system is represented as a


tree of small subfiles.

 A copy of this tree exists in both the suspended and resumed VM instances.

 The advantage of using a tree-based representation of files is that the


caching ensures the transmission of only those files which have been
changed.

 The ISR technique may increase the down time because single page may be
transferred multiple times.

293
Implementation-writable working sets
 Significant overhead: transferring memory pages that
are subsequently modified.

 Good candidates for push phase


Pages are seldom or never modified.

 Writeable working set (WWS)


Pages are written often, and should best be transferred via stop-
and-copy

294
File Migration
 Provide each VM with its own virtual disk which the file system is
mapped to and transport the contents of this virtual disk along with
the other states of the VM.
 Migration of the contents of an entire disk over a network is not a
viable solution.
 A global file system across all machines where a VM could be
located.
 VMM only accesses its local file system. The relevant VM files are
explicitly copied into the local file system for a resume operation and
taken out of the local file system for a suspend operation.
 In smart copying, the VMM exploits spatial locality

295
Network Migration
 The VMM maintains a mapping of the virtual IP and MAC addresses
to their corresponding VMs.

 If the source and destination machines of a VM migration are


typically connected to a single switched LAN, an unsolicited ARP
reply from the migrating host is provided advertising that the IP has
moved to a new location.

 On a switched network, the migrating OS can keep its original


Ethernet MAC address and rely on the network switch to detect its
move to a new port.

296
297
3) Post-Copy

 In post-copy first suspends the migrating VM at the source node, copies


minimal processor state to the target node, resumes the virtual machine at
the target node, and begins fetching memory pages from the source over
the network

 The main benefit of this approach is that each memory page is transferred
at most once, thus avoiding the duplicate transmission overhead of pre-
copy
 Pre-copy approach is more reliable then the post copy because in the pre
copy approach source node keep the updated copy of all memory pages and
CPU states, so in the case of destination failure virtual machine can be
recovered.

 This approach is useful only if the dirty page transfer rate is larger than the
dirty page growth rate.

Problem
 Minimum download time and high total migration time.

299
300
Live Migration of VMs between Two
Xen-Enabled Hosts

301
Implementation-managed & self migration
 Managed migration
 Managed migration, a third-party service provider or a specialized
team within the organization is responsible for overseeing the entire
migration process.
 This approach is often preferred when organizations lack the internal
expertise or resources to manage the migration themselves.

 Self migration
 Self-migration involves organizations taking full responsibility for
planning and executing the migration process internally, using their
own resources and expertise.
 This approach offers greater control and flexibility over the
migration timeline, process, and outcomes.
 Organizations may choose self-migration when they have sufficient
in-house expertise, resources, and infrastructure to handle the
migration effectively. 302
303
What is cloud load balancing?
 Cloud load balancing is the practice of evenly distributing traffic,
workloads, and client requests across multiple servers running in a cloud
environment.

1. Static algorithms
1) Round Robin: This algorithm uses round-robin method to assign jobs. First, it
randomly selects the first node and assigns tasks to other nodes in a round-robin
manner. This is one of the easiest methods of load balancing.
2) Weighted Round Robin assigns servers with greater capacity a higher “weight,”
enabling them to receive more incoming application traffic.
3) IP Hash performs a hash, or a mathematical computation, on the client IP address,
converting it to a number and mapping it to individual servers.
4) Min-Min: Each task determines its minimum completion time over all the
machines and assigns the task to the machine that gives the minimum completion
time.
5) Max-Min: The goal of this algorithm is to maximize resource utilization while
minimizing the potential for overload or underutilization of individual
resources.
304
2. Dynamic algorithms
1) Least Connections distributes traffic to the servers with the fewest active
connections.

2) Least Response Time directs traffic to the servers with the lowest average
response time and fewest connections.

3) Least Bandwidth sends requests to the servers consuming the lowest


amount of bandwidth during a recent period of time.

3. Central and distributed load balancing


4. Power-aware and throttle load balancing (Similar VMs are
grouped)
5. Sender initiative and receiver initiative

305
Sender-Initiated Load Balancing:
• In sender-initiated load balancing, the sender of the request or data
determines how to distribute the workload across available resources.
• This approach is typically implemented by the client or sender
application, which decides how to distribute requests or data based on
various factors such as server availability, latency, or server load.

Receiver-Initiated Load Balancing:


• In receiver-initiated load balancing, the recipient or receiver of the
request or data is responsible for distributing the workload across
available resources.
• Receiver-initiated load balancing allows for centralized control and
management of load distribution, making it easier to implement
advanced load balancing strategies such as dynamic scaling and traffic
shaping.

306
Types of load balancers
Network load balancers
 Network load balancers optimize traffic and reduce latency across local
and wide area networks. They use network information such as IP
addresses and destination ports, along with TCP and UDP protocols, to
route network traffic and provide enough throughput to satisfy user
demand.

Application load balancers


 These load balancers use application content such as URLs, SSL
sessions and HTTP headers to route API request traffic. Because
duplicate functions exist across multiple application servers, examining
application-level content helps determine which servers can fulfill
specific requests quickly and reliably.

307
Virtual load balancers
 With the rise of virtualization and VMware technology, virtual load
balancers are now being used to optimize traffic across servers, virtual
machines and containers. Open-source container orchestration tools like
Kubernetes offer virtual load balancing capabilities to route requests
between nodes from containers in a cluster.
Global server load balancers
 This type of load balancer routes traffic to servers across multiple
geographic locations to ensure application availability. User requests can
be assigned to the closest available server, or if there is a server failure,
to another location with an available server. This failover capability
makes global server load balancing a valuable component of disaster
recovery.

308
Physical versus Virtual Clusters

 The virtual cluster nodes can be either physical or virtual machines.


Multiple VMs running with different OSes can be deployed on the
same physical node.
 The size (number of nodes) of a virtual cluster can grow or shrink
dynamically, similar to the way an overlay network varies in size in a
peer-to-peer (P2P) network.
 The failure of any physical nodes may disable some VMs installed
on the failing nodes. But the failure of VMs will not pull down the
host system.
Physical Vs Virtual Clusters

310
Virtual Cluster

311
VIOLIN Project at Purdue University

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 312


Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 313
Cloud OS for Building Private Clouds

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 314


Eucalyptus : An Open-Source OS for
Setting Up and Managing Private Clouds

Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 315


Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 316
OpenStack Architecture
 OpenStack is an open source software, originally developed by
NASA and Rackspace in 2010 where Rackspace deals with the
storage and NASA deals with the computing aspect.
 It is used to build and manage both private and public cloud
platform.
 It is a control layer which is situated above the virtualized layers and
enables the provider to manage and access everything on the cloud
regardless of the virtualization technology used (e.g. VMware
ESX/ESXi, KVM, Xen, etc.).

317
1) OpenStack Compute (Nova):- It is responsible for handling all
management activities which are required to support the life cycle of
instances in cloud. These activities include instance creation, resource
allocation, and policy management.

2) OpenStack Networking (Quantum): - Quantum is an API-driven system


which is liable for managing the network associated activity within
OpenStack. It allows the administrator to assign dedicated or floating IP
addresses for the VM. These addresses are used to divert traffic during
maintenance or a failure of VM.

318
3) OpenStack Identity Service (Keystone): - Keystone is responsible for the user
authentication and role based access controls for all OpenStack components. Role
based access controls validate whether the authenticated user has a right to access
the requested services. It manage list of all users and the service which they can
access. Main aim of adding this component is to provide the central authentication
to the user for accessing OpenStack components.

4) Block Storage (Cinder): - Cloud user can change their storage requirement
according to their need through the dashboard. Cinder provides persistent block
storage to the running VM instances. In addition, Cinder volume can backup
through the snapshot.

319
5) Object Storage (Swift): - It is equivalent of Amazon Web Services - Simple
Storage Service (S3). It is a distributed storage system and mainly used for
storing static data like VM snapshot, photo storage, archives, VM images and
backups. Data stored in Swift automatically replicates across the multiple node
to ensure redundancy and fault tolerance. In case of server failure, OpenStack
replicate its content to the other server.

5) OpenStack Image Service (Glance): - Images of VMs and its snapshots are
stored in Glance. These images worked as a template for creating new VMs. In
Glance, the cloud provider stores a set of VM images with different configurations
and uses these images to quickly launch the VM instance. It allows the users to
copy and save the snapshot of running VM that can be used to recreate the VM.

320
7) Dashboard (Horizon): - It provides the web based graphical user interface which
is used for management of VM. In OpenStack, all hypervisor turn into the single
pool of resources which is managed by the single point named dashboard. Both
cloud provider and user use dashboard to perform their task like VM creation,
network configuration, volume management etc.

8) Telemetry Service (Ceilometer): - Ceilometer allows the administrators to track


the resource usage and generate bill according to the usage.

9) Orchestration Heat: - It is mainly used to automate the cloud infrastructure. It


allows the provider to set their policies which automatically assign computing
resources to the VM or application. It also allows user to add or release their
resources according to the application needs.

321
OpenStack conceptual Architecture 322

You might also like