0% found this document useful (0 votes)
16 views44 pages

UNIT - II Cloud Computing

The document discusses the Publish-Subscribe model, which is an asynchronous messaging service that decouples event producers from event processors, and outlines its core concepts such as topics, subscriptions, and messages. It also covers virtualization, defining it as a technique to share physical resources among multiple tenants, detailing types of virtualization, advantages, disadvantages, and various virtualization architectures and mechanisms. Key aspects include CPU, memory, and I/O virtualization, as well as the differences between full and para-virtualization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views44 pages

UNIT - II Cloud Computing

The document discusses the Publish-Subscribe model, which is an asynchronous messaging service that decouples event producers from event processors, and outlines its core concepts such as topics, subscriptions, and messages. It also covers virtualization, defining it as a technique to share physical resources among multiple tenants, detailing types of virtualization, advantages, disadvantages, and various virtualization architectures and mechanisms. Key aspects include CPU, memory, and I/O virtualization, as well as the differences between full and para-virtualization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 44

UNIT -II

Publish – Subscribe
Model
Publish – Subscribe Model
• Publish - Subscribe is an
asynchronous messaging service that
decouples services that produce
events from services that process
events.

• You can use Publish - Subscribe as


messaging-oriented middleware or
event ingestion and delivery for
streaming analytics pipelines.
Publish – Subscribe Model -
Core concepts
• Topic: A named resource to which
messages are sent by publishers.
• Subscription: A named resource
representing the stream of messages
from a single, specific topic, to be
delivered to the subscribing
application. For more details about
subscriptions and message delivery
semantics
Publish – Subscribe Model
• Message: The combination of data
and (optional) attributes that a
publisher sends to a topic and is
eventually delivered to subscribers.
• Message attribute: A key-value
pair that a publisher can define for a
message.
Publisher-subscriber
relationships
• A publisher application creates and
sends messages to a topic.
Subscriber applications create
a subscription to a topic to receive
messages from it. Communication
can be one-to-many (fan-out), many-
to-one (fan-in), and many-to-many.
Publisher-subscriber
relationships
Publish - Subscriber
message flow
INTRODUCTION OF
VIRTUALIZATION
• Virtualization is a technique, which allows to share single physical instance
of an application or resource among multiple organizations or tenants
(customers)..
• Virtualization is a proved technology that makes it possible to run multiple
operating system and applications on the same server at same time.
• Virtualization is the process of creating a logical(virtual) version of a
server operating system, a storage device, or network services.
• The technology that work behind virtualization is known as a virtual
machine monitor(VM), or virtual manager which separates compute
environments from the actual physical infrastructure.
What is the concept behind the
Virtualization
• Creation of a virtual machine over existing operating system
and hardware.

• Host machine: The machine on which the virtual machine is


created.

• Guest machine: virtual machines referred as a guest machine.

• Hypervisor: Hypervisor is a firmware or low-level program

that acts as a Virtual Machine Manager.


ARCHITECTURE OF
VITUALIZATION
Types of Virtualization
1.Hardware Virtualization.

2.Operating system Virtualization.

3.Server Virtualization.

4.Storage Virtualization.
Hardware Virtualization
• When the virtual machine software or virtual machine manager (VMM) is
directly installed on the hardware system is known as hardware
virtualization.

• The main job of hypervisor is to control and monitoring the processor,


memory and other
• hardware resources.

• Usage:
• Hardware virtualization is mainly done for the server platforms, because
controlling virtual machines is much easier than controlling a physical server.
Operating System Virtualization
• When the virtual machine software or virtual machine
manager (VMM) is installed on the Host operating system
instead of directly on the hardware system is known as
operating system virtualization.

• Usage:
• Operating System Virtualization is mainly used for testing
the applications on different platforms of OS.
Server Virtualization
• When the virtual machine software or virtual machine
manager (VMM) is directly installed on the Server system
is known as server virtualization.

• Usage:
• Server virtualization is done because a single physical
server can be divided into multiple servers on the demand
basis and for balancing the load.
Storage Virtualization
• Storage virtualization is the process of grouping the physical
storage from multiple network storage devices so that it looks
like a single storage device.

• Storage virtualization is also implemented by using software


applications.

• Usage:

• Storage virtualization is mainly done for back-up and recovery


purposes.
Cloud vs Virtualization
• Cloud computer is internet based computing where virtual shared provide
Software, Infrastructure, platform.

• Virtualized

• API

• Pay-as-per-use

• Scalability

• Virtualization can exist without the cloud but cloud computing cannot
exist without virtualization.
Advantages of Virtualization
1. Reduced Costs.
2. Efficient hardware Utilization.
3. Virtualization leads to better resource Utilization and increase
performance
4. Testing for software development.
5. Increase Availability
6. Save energy
7. Shifting all your Local Infrastructure to Cloud in a day
8. Possibility to Divide Services
9. Running application not supported by the host.
Disadvantages of Virtualization
1. Extra Costs.

2. Software Licensing.
Virtualization Layers
The virtualization software creates the
abstraction of VMs by interposing a virtualization
layer at various levels of a computer system.
Common virtualization layers include:
1. the instruction set architecture (ISA) level,
2. hardware level,
3. operating system level,
4. library support level, and
5. application level
Virtualization Ranging from Hardware to
Applications in Five Abstraction Levels
1.Virtualization at Instruction Set
Architecture (ISA) level:
• At the ISA level, virtualization is performed by emulating a given ISA by the ISA of the host
machine. Instruction set emulation leads to virtual ISAs created on any hardware
machine. e.g, MIPS binary code can run on an x-86-based host machine with the help of
ISA emulation.
• With this approach, it is possible to run a large amount of legacy binary code written for
various processors on any given new hardware host machine.
• code interpretation – dynamic binary translation - virtual instruction set architecture (V-
ISA)
• 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.
2.Virtualization at Hardware Abstraction
level
• Hardware-level virtualization is performed right on top of the bare hardware.
• On the one hand, this approach generates a virtual hardware environment
for a VM.
• On the other hand, the process manages the underlying hardware through
virtualization.
• The idea is to virtualize a computer’s resources, such as its processors,
memory and I/O devices. The intention is to upgrade the hardware
utilization rate by multiple users concurrently.
Advantage:

• Has higher performance and good application isolation

Shortcoming & limitation:

• Very expensive to implement (complexity)


3.Virtualization at Operating System (OS)
level
• OS-level virtualization creates isolated containers on a single
physical server and the OS instances to utilize the hardware and
software in data centers. The containers behave like real servers.
• OS-level virtualization is commonly used in creating virtual hosting
environments to allocate hardware resources among a large
number of mutually distrusting users.
Advantage:
• Has minimal startup/shutdown cost, low resource requirement, and
high scalability; synchronize VM and host state changes.
Shortcoming & limitation:
• All VMs at the operating system level must have the same kind of
guest OS
• Poor application flexibility and isolation.
Virtualization at OS Level
4.Library Support level
• Since most systems provide well-documented APIs, such an
interface becomes another candidate for virtualization.
• Virtualization with library interfaces is possible by controlling the
communication link between applications and the rest of a system
through API hooks.
• The software tool WINE has implemented this approach to support
Windows applications on top of UNIX hosts.
• Another example is the vCUDA which allows applications executing
within VMs to leverage GPU hardware acceleration.
Advantage:
• It has very low implementation effort
Shortcoming & limitation:
• poor application flexibility and isolation
5.User-Application Level
• Virtualization at the application level virtualizes an application as a VM. On a
traditional OS, an application often runs as a process.
• Therefore, application-level virtualization is also known as process-level
virtualization.
• The most popular approach is to deploy high level language (HLL) VMs. In this
scenario, the virtualization layer sits as an application program on top of the
operating system, and the layer exports an abstraction of a VM that can run
programs written and compiled to a particular abstract machine definition.
• Other forms of application-level virtualization are known as application
isolation, application sandboxing, or application streaming.
Advantage:
• has the best application isolation
Shortcoming & limitation:
• low performance, low application flexibility and high implementation complexity.
User-Application Level Virtualization
Virtualization Structures/Tools and
Mechanisms
• In general, there are three typical classes of VM architecture.
• Before virtualization, the operating system manages the hardware.
• After virtualization, a virtualization layer is inserted between the
hardware and the operating system. In such a case, the virtualization
layer is responsible for converting portions of the real hardware into
virtual hardware.
• Therefore, different operating systems such as Linux and Windows can
run on the same physical machine, simultaneously.
• Depending on the position of the virtualization layer, there are several
classes of VM architectures, namely the hypervisor architecture, para-
virtualization, and host-based virtualization.
• The hypervisor is also known as the VMM (Virtual Machine Monitor).
They both perform the same virtualization operations.
Hypervisor
• A hypervisor is a hardware virtualization technique allowing multiple
operating systems, called guests to run on a host machine. This is also called
the Virtual Machine Monitor (VMM).
Type 1: bare metal hypervisor
Type 2: hosted hypervisor
• The native hypervisors are a more secure option. Unlike the hosted
hypervisor, they do not depend upon the underlying OS.
• So if under attack, you have better chances with the bare-metal hypervisor
(Type 1). This dependency also costs the type 2 server, a little bit of its
efficiency, performance, and speed.
• Type 2 does not have direct access to the host hardware and resources, so
this may make a certain degree of latency inevitable. The already present OS
manages the requirements for memory, storage, and network resources.
Full Binary Translation and Host-based
Virtualization
• Depending on implementation technologies, hardware
virtualization VM architectures can be classified into two
categories:
– Full virtualization and
– Host-based virtualization.

• Full virtualization does not need to modify the host OS. It relies
on binary translation to trap and to virtualize the execution of
certain sensitive, non virtualizable instructions.
• In a host-based system, both a host OS and a guest OS are
used. A virtualization software layer is built between the host OS
and guest OS.
Binary Translation of Guest OS Requests
Using a VMM
• This approach was implemented
by VMware and many other
software companies.
• VMware puts the VMM at Ring 0
and the guest OS at Ring 1. The
VMM scans the instruction
stream and identified the
privileged, control- and behavior
sensitive instructions.
• When these instructions are
identified, they are trapped into
the VMM, which emulates the
behavior of these instructions.
• The method used in this
emulation is called binary
translation. Therefore, full
virtualization combines binary
translation and direct execution.
Host-Based Virtualization
• An alternative VM architecture is to
install a virtualization layer on top of
the host OS. This host OS is still
responsible for managing the
hardware.
• This host-based architecture has some
distinct advantages. First, the user can
install this VM architecture without
modifying the host OS. The virtualizing
software can rely on the host OS to
provide device drivers and other low-
level services. This will simplify the VM
design and ease its deployment.
• Second, the host-based approach
appeals to many host machine
configurations. Compared to the
hypervisor/VMM architecture, the
performance of the host-based
architecture may also be low.
Para-virtualization
• Paravirtualization is a type of
virtualization where software
instructions from the guest
operating system running
inside a virtual machine can
use “hypercalls” that
communicate directly with
the hypervisor. This provides
an interface very similar to
software running natively on
the host hardware.
• paravirtualization enables
the Guest OS to interact with
the hypervisor
Full Virtualization vs. Para-Virtualization
Full virtualization
• Does not need to modify guest OS, and critical instructions are emulated by
software through the use of binary translation.
• VMware Workstation applies full virtualization, which uses binary
translation to automatically modify x86 software on-the-fly to replace
critical instructions.
Advantage: no need to modify OS.
Disadvantage: binary translation slows down the performance.
Para virtualization
• Reduces the overhead, but cost of maintaining a paravirtualized OS is high.
• The improvement depends on the workload.
• Para virtualization must modify guest OS, non-virtualizable instructions are
replaced by hyper calls that communicate directly with the hypervisor or
VMM.
• Para virtualization is supported by Xen, Denali and VMware ESX.
The XEN Architecture
• Xen is an open source
hypervisor program
developed by Cambridge
University. Xen is a micro-
kernel hypervisor, which
separates the policy from the
mechanism.
• Xen does not include any
device drivers natively . It just
provides a mechanism by
which a guest OS can have
direct access to the physical
devices.
• As a result, the size of the Xen
hypervisor is kept rather
small. Xen provides a virtual
environment located between
the hardware and the OS.
Virtualization of CPU, Memory, and I/O Devices

• CPU Virtualization
• A VM is a duplicate of an existing computer system in which a majority of the
VM instructions are executed on the host processor in native mode. Thus,
unprivileged instructions of VMs run directly on the host machine for higher
efficiency. Other critical instructions should be handled carefully for
correctness and stability.
• The critical instructions are divided into three categories: privileged
instructions, control–sensitive instructions, and behavior-sensitive instructions.
• Privileged instructions execute in a privileged mode and will be trapped if
executed outside this mode.
• Control-sensitive instructions attempt to change the configuration of resources
used. Behavior-sensitive instructions have different behaviors depending on
the configuration of resources, including the load and store operations over the
virtual memory.
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.

RI SC 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.
Memory Virtualization
• Virtual memory virtualization is similar to the virtual memory
support provided by modern operating systems. I n a traditional
execution environment, the operating system maintains mappings
of virtual memory to ma chine memory using page tables, which
is a one-stage mapping from virtual memory to machine memory.
• However, in a virtual execution environment, virtual memory
virtualization involves sharing the physical system memory in RAM
and dynamically allocating it to the physical memory of the VMs.
• That means a two-stage mapping process should be maintained
by the guest OS and the VMM, respectively: virtual memory to
physical memory and physical memory to machine memory.
I/O Virtualization
• there are three ways to implement I/O virtualization: full device
emulation, para-virtualization, and direct I/O.
• I/O virtualization. Generally, this approach emulates well-known,
real-world devices. All the functions of a device or bus infrastructure,
such as device enumeration, identification, interrupts, and DMA, are
replicated in software. This software is located in the VMM and acts
as a virtual device.
• The para-virtualization method of I/O virtualization is typically used in
Xen. It is also known as the split driver model consisting of a frontend
driver and a backend driver. It achieves beer device performance than
full device emulation, it comes with a higher CPU overhead
• Direct I/O virtualization lets the VM access devices directly. It can
achieve close-to native performance without high CPU costs.

You might also like