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

Module 1

Uploaded by

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

Module 1

Uploaded by

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

CLOUD COMPUTING AND

APPLICATIONS

Department of
Computer Science & Engineering

www.cambridge.edu.in
Department of Computer Science & Engineering www.cambridge.edu.i
Mastering Cloud Computing

Department of Computer Science & Engineering www.cambridge.edu.i


Chapters

Module I:
Chapter 1 — Introduction Chapter 3 — Virtualization

Module II
Chapter 4 — Cloud Computing Architecture Chapter 5 — Aneka: Cloud Application Platform

Module III
Chapter 6 — Concurrent Computing: Thread Programming Chapter 7 — High-Throughput Computing: Task Programming

Module IV
Chapter 8 — Data Intensive Computing: Map-Reduce Programming

Module V
Chapter 9 — Cloud Platforms in Industry Chapter 10 — Cloud Applications

Department of Computer Science & Engineering www.cambridge.edu.i


The Next Revolution in IT The
Big Switch in IT • Cloud Computing
– Subscribe
• Classical Computing – Use
– Buy & Own
• Hardware, System Software,
Every 18 months?

Applications often to meet peak


needs.
– Install, Configure, Test, Verify
– Manage
• – .. – $ - pay for what you use,
– Finally, use it – based on QoS
• – $$$$....$(High CapEx)
What is cloud computing?
Cloud computing is a technological advancement it is based on
the concept of dynamic provisioning, which is applied not only
to services but also to compute capability, storage, networking,
and information technology (IT) infrastructure in general.
Resources are made available through the Internet and offered
on a pay-per-use basis from cloud computing vendors.
Vision of Cloud Computing

Department of Computer Science & Engineering www.cambridge.edu.i


I need to grow my I have a lot of
infrastructure, but I do infrastructure that I want
not know for how to rent …
long… I have a surplus of
infrastructure that I want
to make use of

I cannot invest in
infrastructure, I just
started my business….

I have infrastructure and


middleware and I can host
applications

I want to focus on
application logic and not
maintenance and scalability
issues

I have infrastructure and


provide application
services

I want to access and edit


my documents and photos
from everywhere..
Public Clouds

Applications

Development and
Runtime Platform
Compute

All users, on any device Storage

Cloud Manager

Private Resources

Private Cloud Private Cloud (Government)

Organization Personnel Government Agencies


Defining Cloud

Department of Computer Science & Engineering www.cambridge.edu.i


No capital investments

Quality of Service

Pay as you go

Billing

IT outsourcing

Security
Cloud
Computing?
Defining Cloud
A Closer look

• Cloud computing Helping


• Enterprises
• Governments
• Public Institutes
• Private Institutes
• Research Organization

Department of Computer Science & Engineering www.cambridge.edu.i


Examples

• Large enterprise can offload some of their activities to Cloud based system.

Department of Computer Science & Engineering www.cambridge.edu.i


Example

• Small Enterprises and Start-ups can afford to translate into business results their
ideas more quickly without excessive upfront cost

Department of Computer Science & Engineering www.cambridge.edu.i


Example
• System Developers can concentrate on business logic rather than dealing with the
complexity of infrastructure management and scalability

Department of Computer Science & Engineering www.cambridge.edu.i


Cloud Computing Reference Model
Web 2.0 Software as a Service
Interfaces End user applications Scientific
applications
Office automation, Photo editing,
CRM, and Social Networking
Examples: Google Documents, Facebook, Flickr, Salesforce

Platform as a Service
Runtime Environment for Applications Development
and Data Processing Platforms
Examples: Windows Azure, Hadoop, Google AppEngine, Aneka

Infrastructure as a Service
Virtualized Servers Storage and
Networking
Examples: Amazon EC2, S3, Rightscale, vCloud
Characteristics and Benefits

• No Upfront Commitments
• On demand access
• Nice pricing
• Simplified application acceleration and scalability
• Efficient resource allocation
• Energy efficiency and seamless creation and use third-party services.

Department of Computer Science & Engineering www.cambridge.edu.i


Challenges Ahead

• Dynamic Provisioning of Cloud Computing Services


• Security and Privacy
• Legal issues
• Performance and Bandwidth Cost
• Reliability and Availability

Department of Computer Science & Engineering www.cambridge.edu.i


Historical Development of Cloud
Computing

• The idea of renting computing services by leveraging large distributed


computing facilities has been around for long time. It dates back to the
days of the mainframes in the early 1950s. From there on, technology
has evolved and been refined. This process has created a series of
favorable conditions for the realization of cloud computing.

Department of Computer Science & Engineering www.cambridge.edu.i


2010: Microsoft
1970: DARPA’s TCP/IP 1999: Grid Computing Azure

1984: IEEE 802.3 1997: IEEE 2008: Google


Ethernet & LAN 802.11 (Wi-Fi) AppEngine
1966: Flynn’s Taxonomy
SISD, SIMD, MISD, MIMD 1989: TCP/IP
2007: Manjrasoft Aneka
IETF RFC 1122
1969: ARPANET
1984: DEC’s 2005: Amazon
1951: UNIVAC I, VMScluster AWS (EC2, S3)
UNIVersal
Automatic Computer 1975: Xerox PARC
Invented Ethernet 2004: Web 2.0
I
Clouds First Mainframe 1990: Lee-Calliau
1960: Cray’s First WWW, HTTP, HTML
Grids Supercomputer

Clusters

Mainframes

1950 1960 1970 1980 1990 2000 2010


Evolution of cloud technologies

• Distributed Systems
🡪A distributed system is a collection of independent computers that appears to its users as a
single system and also it acts as a single computer.

🡪The main and primary motive of distributed systems is to share resources and to utilize
them better.

Some of the most common examples of distributed systems:


•Telecommunications networks (including cellular networks and the fabric of the
internet)
•Multiplayer video games
Department of Computer Science & Engineering www.cambridge.edu.i
Mainframes

• A large high-speed computer, especially one supporting numerous workstations or


peripherals the central processing unit and primary memory of a computer.

Department of Computer Science & Engineering www.cambridge.edu.i


Clusters

• A computer cluster consists of a set of loosely or tightly connected computers that


work together so that, in many respects, they can be viewed as a single system.
computer clusters have each node set to perform the same task, controlled

Department of Computer Science & Engineering www.cambridge.edu.i


Grids

Grid computing is the collection of computer resources from multiple locations to


reach a common goal. The grid can be thought of as a distributed system with non-
interactive workloads that involve a large number of files.
The components of a cluster are usually connected to each other through fast local
area networks, with each node (computer used as a server) running its own instance
of an operating system. In most circumstances,

Department of Computer Science & Engineering www.cambridge.edu.i


..

Department of Computer Science & Engineering www.cambridge.edu.i


Virtualization

Virtualization
• In computing, virtualization refers to the act of creating a virtual (rather than actual)
version of something, including virtual computer hardware platforms, storage devices,
and computer network resources.
• Another Cloud Technology of Cloud Computing
• Hardware virtualization
• Storage or Network Virtualization

Department of Computer Science & Engineering www.cambridge.edu.i


Virtualization

Department of Computer Science & Engineering www.cambridge.edu.i


Web 2.0

• The second stage of development of the Internet characterized especially


change from static web pages to dynamic or user-generated content and the
growth of social media.
• Web 2.0 brings interactivity and flexibility into Webpages, providing enhanced user
experience by gaining Web based access to all the functions that are normally found
in desktop applications
• Examples of Web2.0applicationsare Google Documents, Google Maps, Flickr,
Facebook, Twitter, YouTube, delicious, Blogger, and Wikipedia

Department of Computer Science & Engineering www.cambridge.edu.i


Service-Oriented Computing (SOC)

supports the development of rapid, low-cost, flexible, interoperable, and


evolvable applications and systems

Department of Computer Science & Engineering www.cambridge.edu.i


• Service-oriented computing introduces and diffuses two important concepts, which are
also fundamental to cloud computing: quality of service(QoS) and
Software-as-a-Service(SaaS).
• The interaction with Webs services happens through Simple Object Access Protocol
(SOAP)
• One of the most popular expressions of service orientation is represented by Web
Services (WS)
• Web services are software components that expose functionalities accessible using a
method invocation pattern that goes over the Hypertext Transfer Protocol (HTTP).
• XML language that defines how to invoke a Web service method and collect the result.
• Using SOAP and WSDL over HTTP, Web services become platform independent and
accessible to the World Wide Web

Department of Computer Science & Engineering www.cambridge.edu.i


Utility Oriented Computing

The Computer Utility, is a service provisioning model in which a service provider


makes infrastructure needed, and charges them for specific usage rather than a
Flat rate.

Department of Computer Science & Engineering www.cambridge.edu.i


Building Cloud Computing
Environment

The creation of cloud computing environments encompasses both the development of


applications and systems that leverage cloud computing solutions and the creation of
frameworks, platforms, and infrastructures delivering cloud computing services

Department of Computer Science & Engineering www.cambridge.edu.i


• Enterprise Application
Infrastructure and System

Department of Computer Science & Engineering www.cambridge.edu.i


Computing Platform and Technologies

AWS – Amazon Web Service (IAAS)


(S3 and EC2)

Department of Computer Science & Engineering www.cambridge.edu.i


Google App Engine

• Paas
• For Developers

Department of Computer Science & Engineering www.cambridge.edu.i


Microsoft Azure

• Paas
• Web role (to host application), worker role (container of applications for work load processing)
and virtual machine role (provides virtual environment).
• https://azure.microsoft.com

Department of Computer Science & Engineering www.cambridge.edu.i


Hadoop

Hadoop an open source,Java- programming frameworkthat does processing


and storageof extremely large data.
• It is develop by google
• It provides two fundamental operations for data processing
• Map and reduce
• Map: transforms and synthesis the input
• Reduce: aggregates the output

• https://cloud.google.com/hadoop
• http://hadoop.apache.org/

Department of Computer Science & Engineering www.cambridge.edu.i


Hadoop

Department of Computer Science & Engineering www.cambridge.edu.i


Salesforce

salesforce.com, inc. is an American cloud computing company headquartered in San


Francisco, California. It provides SAAS
https://www.salesforce.com/in

Department of Computer Science & Engineering www.cambridge.edu.i


Department of Computer Science & Engineering www.cambridge.edu.i
Manjarasoft Aneka

• Aneka is a platform and a framework for developing distributed applications on


the Cloud.

• One of the key features of Aneka is the ability of providing different ways for
expressing distributed applications by offering different programming models;
• http://www.manjrasoft.com/products.html

Department of Computer Science & Engineering www.cambridge.edu.i


Virtualization

• Virtualization is the creation of a virtual rather than actual version of something,


such as an operating system, a server, a storage device or network resources
• One of the fundamental Concepts of Cloud Computing

Department of Computer Science & Engineering www.cambridge.edu.i


What is Virtualization?
Department of Computer Science & Engineering www.cambridge.edu.i
Why are virtualized environments so popular today?

– Increased performance and computing capacity


● PCs are having immense computing power.
– Underutilized hardware and software resources
● Limited use of increased performance & computing capacity.
– Lack of space
● Continuous need for additional capacity.
– Greening initiatives
● Reduce carbon footprints
● Reducing the number of servers, reduce power
consumption.
– Rise of administrative costs
● Power and cooling costs are higher then IT equipments

Department of Computer Science & Engineering www.cambridge.edu.i


Virtualized Environments

• Virtualization is a method of logically dividing the system resources between


different applications
• Application Virtualization
• Desktop Virtualization
• Server Virtualization
• Network Virtualization
• Storage Virtualization

Department of Computer Science & Engineering www.cambridge.edu.i


Applications
Application - level
Virtualization

Programming Languages
Execution Stack

Programming
Language level
Virtualization

Operative Systems
OS- level Virtualization

Hardware
Hardware - level
Virtualization
● Three major components of Virtualized Environments
– Guest – system component that interacts with
Virtualization Layer.
– Host – original environment where guest runs.
– Virtualization Layer – recreate the same or different
environment where guest will run.

Department of Computer Science & Engineering www.cambridge.edu.i


Guest Virtual Image Applications Applications

Virtual Hardware Virtual Storage


Virtual Networking
Virtualization Layer
Software Emulation

Host Physical Hardware Physical Storage Physical Networking

Virtualization Reference Model


Characteristics of Virtual Environment

• Increased Security
• Managed Execution
✔ - Sharing
✔ - Aggregation
✔ - Emulation
✔ - Isolation

• Portability

Department of Computer Science & Engineering www.cambridge.edu.i


Increased Security

– Ability to control the execution of a guest


– Guest is executed in emulated environment.
– Virtual Machine Manager control and filter the activity of the guest.
– Hiding of resources.
– Having no effect on other users/guest environment.

Department of Computer Science & Engineering www.cambridge.edu.i


Managed Execution types

– Sharing
● Creating separate computing environment within the
same host.
● Underline host is fully utilized.
– Aggregation
● A group of separate hosts can be tied together and represented as single virtual host.
– Emulation
● Controlling & Tuning the environment exposed to guest.
– Isolation
● Complete separate environment for guests
● Performance tuning

Department of Computer Science & Engineering www.cambridge.edu.i


Managed Execution

Department of Computer Science & Engineering www.cambridge.edu.i


Portability

– safely moved and executed on top of different virtual machine.


– Application Development Cycle more flexible and application deployment very
straight forward
– Availability of system is with you ready to use.

Department of Computer Science & Engineering www.cambridge.edu.i


Taxonomy of Virtualization
Techniques

• Virtualization is mainly used to emulate execution


environment , storage and networks.
• Execution Environment classified into two :-
– Process-level – implemented on top of an existing operating system.
– System-level – implemented directly on hardware and do not or
minimum requirement of existing operating system

Department of Computer Science & Engineering www.cambridge.edu.i


Department of Computer Science & Engineering www.cambridge.edu.i
Execution Virtualization

● It defines the interfaces between the levels of abstractions, which


hide implementation details.
● Virtualization techniques actually replace one of the layers and intercept
the calls that are directed towards it.

Department of Computer Science & Engineering www.cambridge.edu.i


Machine Reference Model

● Hardware is expressed in terms of the Instruction Set Architecture (ISA).


– ISA for processor, registers, memory and the interrupt management.
● Application Binary Interface (ABI) separates the OS layer from the application and libraries
which are managed by the OS.
– System Calls defined
– Allows probabilities of applications and libraries across OS.

Department of Computer Science & Engineering www.cambridge.edu.i


ISA: Security Classes

● Nonprivileged instructions
– That can be used without interfering with other tasks because they do
not access shared resources. Ex. Arithmetic , floating & fixed point.
● Privileged instructions
– That are executed under specific restrictions and are mostly used for
sensitive operations, which expose (behavior-sensitive) or modify
(control-sensitive) the privileged state.
● Behavior-sensitive – operate on the I/O
● Control-sensitive – alter the state of the CPU register.

Department of Computer Science & Engineering www.cambridge.edu.i


Privileged Hierarchy: Security Ring

● Ring-0 is in most privileged level


, used by the kernel.
● Ring-1 & 2 used by the OS-level services
● and , R3 in the least privileged level , used by the user.
● Recent system support two
levels :-
– Ring 0 – supervisor mode
– Ring 3 – user mode

Department of Computer Science & Engineering www.cambridge.edu.i


Hardware-level virtualization

● It is a virtualization technique that provides an abstract execution


environment in terms of computer hardware on top of which a guest OS
can be run.
● It is also called as system virtualization.

Department of Computer Science & Engineering www.cambridge.edu.i


Hardware-level virtualization

Department of Computer Science & Engineering www.cambridge.edu.i


Hypervisor

● Hypervisor runs above the supervisor mode.


● It runs in supervisor mode.
● It recreates a h/w environment.
● It is a piece of s/w that enables us to run one or more VMs on a
physical server(host).
● Two major types of hypervisor
– Type -I
– Type-II

Department of Computer Science & Engineering www.cambridge.edu.i


Type-I Hypervisor

● It runs directly on top of the hardware.


● Takes place of OS.
● Directly interact with the ISA exposed by the underlying hardware.

● Also known as native virtual machine

Department of Computer Science & Engineering www.cambridge.edu.i


Type-II Hypervisor

● It require the support of an operating system to provide virtualization


services.
● Programs managed by the OS.
● Emulate the ISA of virtual h/w.
● Also called hosted virtual machine.

Department of Computer Science & Engineering www.cambridge.edu.i


Virtual Machine Manager (VMM)

● Main Modules :-
– Dispatcher
● Entry Point of VMM
● Reroutes the instructions issued by VM instance.
– Allocator
● Deciding the system resources to be provided to the
VM.
● Invoked by dispatcher
– Interpreter
● Consists of interpreter routines
● Executed whenever a VM executes a privileged instruction.
● Trap is triggered and the corresponding routine is executed.

Department of Computer Science & Engineering www.cambridge.edu.i


Virtual Machine Manager (VMM)

Department of Computer Science & Engineering www.cambridge.edu.i


Criteria of VMM

● Equivalence – same behavior as when it is executed directly on the


physical host.

● Resource control – it should be in complete control of


virtualized resources.
● Efficiency – a statistically dominant fraction of the machine instructions
should be executed without intervention from the VMM

Department of Computer Science & Engineering www.cambridge.edu.i


Theorems

● Popek and Goldberg provided a classification of the


instruction set and proposed three theorems that define the
properties that hardware instructions need to satisfy in
order to efficiently support virtualization.
● Classification of IS-
– Privileged Instructions
● Trap if the processor is in user mode
– Control sensitive Instructions

Department of Computer Science & Engineering www.cambridge.edu.i


Theorems-1

● Theorems 1
– For any conventional third-generation computer, a VMM may be
constructed if the set of sensitive instructions for that computer is a
subset of the set of privileged instructions.

Department of Computer Science & Engineering www.cambridge.edu.i


Theorems

● Theorems 2
– A conventional third-generation computers is recursively
virtualizable if:
● It is virtualizable and
● A VMM without any timing dependencies can be constructed for it.

Department of Computer Science & Engineering www.cambridge.edu.i


Theorems

● Theorems 3
– A hybrid VMM may be constructed third- generation machine in
which the set of user- sensitive instructions is a subset of the
set of privileged instructions.
– In HVM, more instructions are interpreted rather than being
executed directly.

Department of Computer Science & Engineering www.cambridge.edu.i


Hardware virtualization Techniques

● CPU installed on the host is only one set, but each VM that runs on the host
requires their own CPU.
● It means CPU needs to virtualized, done by hypervisor.

Department of Computer Science & Engineering www.cambridge.edu.i


Heading Goes Here

● Hardware-assisted virtualization
– In this hardware provides architectural support for building a
VMM able to run a guest OS in complete isolation.
– Intel VT and AMD V extensions.

– Early products were using binary translation to trap some sensitive


instructions and provide an emulated version.
– Software emulation is significantly costly from the performance point
of view.

Department of Computer Science & Engineering www.cambridge.edu.i


● Full virtualization
– Ability to run program (OS) directly on top of a virtual machine and without any
modification.
– VMM require complete emulation of the entire underneath h/w
– Advantages
● Complete isolation
● Enhanced security
● Ease of emulation of different architectures and coexistence
– Key challenge is interception of privileged instructions such as I/O,
– Since they change the state of the resource exposed by host. So provide virtual
environment for all the instructions.

Department of Computer Science & Engineering www.cambridge.edu.i


● Paravirtualization
– Not-transparent virtualization solution that allows implementing Thin VMM
– Expose software interface to the virtual machine that is slightly modified
from the host.
– Guest OS need to be modified.
– Aim is to provide the capability to demand the execution of performance
critical operation directly on host.
– Allows simply transfer the execution of instructions which were hard
to virtualized, directly to the host.
– Suitable for open source os.

Department of Computer Science & Engineering www.cambridge.edu.i


Heading Goes Here

● Partial virtualization
– Partial emulation of the underlying hardware
– Not allow complete isolation to guest OS.
– Address space virtualization is a common feature of
contemporary operating systems.
– Address space virtualization used in time- sharing system.

Department of Computer Science & Engineering www.cambridge.edu.i


Operating system-level virtualization

● It offers the opportunity to create different and separated execution


environments for applications that are managed concurrently.
● No VMM or hypervisor
● Virtualization is in single OS
● OS kernel allows for multiple isolated user space instances
● Good for server consolidation.
● Ex. chroot operation changes root directory to parent and child specific directory
● Example for os virtualization are FreeBSDJails, OpenVZ etc.

Department of Computer Science & Engineering www.cambridge.edu.i


Programming language-level virtualization
● It is mostly used to achieve ease of deployment of application, managed execution and portability across different
platform and OS.
● It consists of a virtual machine executing the byte code of a program, which is the result of the compilation
process.
● Produce a binary format representing the machine code for an abstract architecture.
● It was introduced in 1996 for implementation of Basic Combined Programming Language (BCPL) an ancestors of C
language.
● Example
– Java platform – Java virtual machine (JVM)
– .NET provides Common Language Infrastructure (CLI)
● They are stack-based virtual machines
● Register based VM’s which are close to underlying architecture Eg: Parrot used to support execution of PERL

Department of Computer Science & Engineering www.cambridge.edu.i


Advantage of programming/process- level VM

● Provide uniform execution environment

across different platforms.

● This simplifies the development and deployment efforts.

● Allow more control over the execution of programs.

● Security; by filtering the I/O operations


● Easy support for sandboxing

Department of Computer Science & Engineering www.cambridge.edu.i


Application-level
virtualization

● It is a technique allowing applications to run in runtime environments that do not


natively support all the features required by such applications.
● In this, applications are not installed in the expected runtime environment.
● This technique is most concerned with :-
– Partial file system
– Libraries
– Operating System component emulation

Department of Computer Science & Engineering www.cambridge.edu.i


Strategies for Implementation
Application-Level Virtualization

● Emulation can be used to execute program binaries compiled for different h/w
architures
● Two techniques can be implemented:-
– Interpretation -
● In this every source instruction is interpreted by an emulator for executing native ISA instructions,
● Minimal start up cost but huge overhead.
– Binary translation -
● In this every source instruction is converted to native instructions with equivalent functions.
● Block of instructions translated , cached and reused.
● Large overhead cost , but over time it is subject to better performance.

Department of Computer Science & Engineering www.cambridge.edu.i


Strategies for Implementation
Application-Level Virtualization (Cont..)

● This is a good techniques for in case of missing libraries in


host OS.
● It allows incompatible to run together,
● It runs on the specific environment so it supports all the
applications which runs on specific environment.
● Eg: Wine

Department of Computer Science & Engineering www.cambridge.edu.i


Other Types: Storage Virtualization

● It allows decoupling the physical organization of the h/w from its logical
representation.
● Using Network based virtualization known as storage area network (SAN).

Department of Computer Science & Engineering www.cambridge.edu.i


Network Virtualization

● It combines h/w appliances and specific software for the creation and
management of a virtual n/w.
● It can aggregate different physical networks into a single logical network.

Department of Computer Science & Engineering www.cambridge.edu.i


Application Server Virtualization

• Application server virtualization abstracts a collection of application servers that


provide the same service as a single virtual application server
• Providing better quality of service rather than emulating a different environment

Department of Computer Science & Engineering www.cambridge.edu.i


Virtualization and cloud computing

• Virtualization plays an important role in cloud computing

• Virtualization technologies are primarily used to offer configurable computing


environments and storage.

• Hardware virtualization is an enabling factor for solutions in the (IaaS) market


segment

• programming language virtualization is a technology leveraged in (PaaS) offerings.

Department of Computer Science & Engineering www.cambridge.edu.i


Server consolidation and virtual machine migration
Pros and cons of
virtualization

• Advantages of Virtualization
✔ Reduced spending
✔ Sandbox
✔ Portability
✔ Efficient use of resources.
✔ Easier backup and disaster recovery
✔ Better business continuity
✔ More efficient IT operations

Department of Computer Science & Engineering www.cambridge.edu.i


Disadvantages of Virtualization

✔ Upfront costs.
✔ Software licensing considerations
✔ Possible learning curve
✔ Performance degradation
• Maintain the status of virtual processor
• Support of privileged instructions
• Support of paging within VM
✔ Inefficiency and degraded user experience
✔ Security holes and new threats

Department of Computer Science & Engineering www.cambridge.edu.i


Technology examples

• Xen: paravirtualization
• VMware: full virtualization
• Microsoft Hyper-V

Department of Computer Science & Engineering www.cambridge.edu.i


Xen: paravirtualization

• Xen is the most popular implementation of paravirtualization


• Xen is an open-source initiative
• Developed by a group of researchers at the University of Cambridge
• Citrix also offers it as a commercial solution,
• Xen-based technology is used for Desktop virtualization or server virtualization
• Xen Cloud Platform (XCP)
• high-performance execution of guest operating systems.
• This is done by modifying portions of the guest operating systems run by Xen

Department of Computer Science & Engineering www.cambridge.edu.i


Xen: paravirtualization
• A Xen-based system is managed by the Xen hypervisor, which runs in the highest
privileged mode.
• Guest operating systems are executed within domains, which represent virtual
machine instances.
• specific control software, which has Privileged access to the host and controls all the
other guest operating systems is executed in a special domain called Domain 0.
• Once VMM manager has completely booted, Domain 0 hosts HTTP server that
serves requests for virtual machine creation, configuration, and termination.
• https://www.xenproject.org/

Department of Computer Science & Engineering www.cambridge.edu.i


x86 implementations support four different security levels

two levels: Ring 0 for the kernel code, and Ring 3 for user application and non privileged OS code.

Department of Computer Science & Engineering www.cambridge.edu.i


Xen: paravirtualization
• Paravirtualization needs the operating system codebase to be modified.
• Open-source operating systems such as Linux can be easily modified, since their
code is publicly available.

Department of Computer Science & Engineering www.cambridge.edu.i


VMware: full virtualization
• Underlying hardware is replicated and made available to the guest operating system.
• Runs unaware of such abstraction layers and does not need to be modified.
• It support Type 1 and Type 2 Hypervisor.
• Full virtualization is possible through direct execution (for non sensitive instructions)
and binary translation (for sensitive instructions).
• VMware also provides additional tools and software that simplify the use of
virtualization technology either in a desktop environment or server environment.

Department of Computer Science & Engineering www.cambridge.edu.i


VMware: full virtualization
• The use of dynamic binary translation was the only solution that allowed running x86
guest operating systems unmodified in a virtualized environment.
• x86 architecture design does not satisfy the first theorem of virtualization (sensitive
instructions are not subset of privileged instruction Set).
• This causes a different behavior when such instructions are not executed in Ring 0.
• In dynamic binary translation, the trap triggers the translation of the offending
instructions into an equivalent set of instructions that achieves the same goal without
generating exceptions.
• The major advantage is that guests can run unmodified in a virtualized environment.

Department of Computer Science & Engineering www.cambridge.edu.i


VMware: full virtualization
• Disadvantage: Translating instructions at runtime introduces an additional overhead.
• CPU virtualization is only a component of a fully virtualized hardware environment.
• VMware achieves full virtualization by providing virtual representation of memory and
I/O devices.
• Memory virtualization can deeply impact performance without the appropriate
hardware support.(eg: OS management unit(MMU)).
• The translation look-aside buffer (TLB) in the virtual MMU directly maps physical
pages, and the performance slowdown only occurs in case of a TLB miss.

Department of Computer Science & Engineering www.cambridge.edu.i


A full virtualization reference model

Department of Computer Science & Engineering www.cambridge.edu.i


Microsoft Hyper-V
• Hyper-V is an infrastructure virtualization solution developed by Microsoft for server
virtualization.
• Hyper-V is currently shipped as a component of Windows Server 2008 R2 that installs
the hypervisor as a role within the server.
• Hyper-V supports multiple and concurrent execution of guest operating systems by
means of partitions.
• A partition is a completely isolated environment in which an operating system is
installed and run.

Department of Computer Science & Engineering www.cambridge.edu.i


Microsoft Hyper-V
• Hyper-V takes control of the hardware, and the host operating system becomes a
virtual machine instance with special privileges, called the parent partition.
• The parent partition (also called the root partition) is the only one that has direct
access to the hardware.
• It runs the virtualization stack, hosts all the drivers required to configure guest
operating systems, and creates child partitions through the hypervisor.
• Child partitions are used to host guest operating systems and do not have access to
the underlying hardware.

Department of Computer Science & Engineering www.cambridge.edu.i


Microsoft Hyper-V
The hypervisor is logically defined by the following components:
• Hypercalls interface: This is the entry point for all the partitions for the execution of sensitive
instructions and the parent partition uses this interface to create child partitions.
• Memory service routines (MSRs): It control the memory and its access from partitions and
the hypervisor uses the I/O MMU to fast-track access to devices from partitions by translating
virtual memory addresses.
• Advanced programmable interrupt controller (APIC): It is an interrupt controller, and it
manages the signals coming from the underlying hardware when some event occurs
• Each virtual processor is equipped with a synthetic interrupt controller (SynIC), The
hypervisor is responsible for dispatching the physical interrupts to the synthetic interrupt
controllers.

Department of Computer Science & Engineering www.cambridge.edu.i


Microsoft Hyper-V
• Scheduler: It schedules the virtual processors to run on available physical processors. It
controlled by policies that are set by the parent partition.
• Address manager: It is used to manage the virtual network addresses that are allocated to
each guest operating system.
• Partition manager: It is in charge of performing partition creation, finalization,
destruction, enumeration, and configurations.

Department of Computer Science & Engineering www.cambridge.edu.i


Enlightened I/O and synthetic devices
• Enlightened I/O provides an optimized way to perform I/O operations, allowing guest
operating systems to leverage an inter partition communication channel.
• There are three fundamental components:
• VMBus: This channel and defines the protocol for communication between partitions.
• Virtual Service Providers(VSPs): These are kernel-level drivers that are deployed in the
parent partition and provide access to the corresponding hardware devices.
• Virtual Service Clients(VSCs): It represent the virtual device drivers (also called
synthetic drivers) seen by the guest operating systems in the child partitions.

Department of Computer Science & Engineering www.cambridge.edu.i


Department of Computer Science & Engineering www.cambridge.edu.i
END OF MODULE 1

Department of Computer Science & Engineering www.cambridge.edu.i

You might also like