0% found this document useful (0 votes)
27 views72 pages

Cloudcomputing m1&2

Uploaded by

rumanp2002
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)
27 views72 pages

Cloudcomputing m1&2

Uploaded by

rumanp2002
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/ 72

Distributed systems

• A distributed system is a collection of independent


computers that appears to its users as a single coherent
system.
• composed of multiple independent components and these
components are perceived as a single entity by users.
• clouds hide the complex architecture they rely on and
provide a single interface to users
• Objective:to share resources and utilize them better.
• Distributed systems exhibit other properties such as
heterogeneity, openness, scalability, transparency,
concurrency, continuous availability, and independent
failures.
Three major milestones
• Mainframes.
• These were the first examples of large computational facilities leveraging
multiple processing units.
• Mainframes were powerful, highly reliable computers specialized for large
• data movement and massive input/output (I/O) operations.
• used by large organizations for bulk data processing tasks such as online
transactions, enterprise resource planning, and other operations involving
the processing of significant amounts of data.
• multiple processors, were presented as a single entity to users. One of the
most attractive features of mainframes was the ability to be highly reliable
computers that were “always on” and capable of tolerating failures
transparently.
• No system shutdown was required to replace failed components, and the
system could work without interruption.
• Batch processing was the main application of mainframes
• Clusters.
• Cluster computing is a low-cost alternative to the use of mainframes and
supercomputers.
• These machines could then be connected by a high-bandwidth network and
controlled by specific software tools that manage them as a single system.
• Starting in the 1980s, clusters become the standard technology for parallel and
high-performance computing.
• they were cheaper than mainframes and made high-performance computing
available to a large number of groups, including universities and small research
labs.
• Cluster technology contributed considerably to the evolution of tools and
frameworks for distributed computing, including Condor, Parallel Virtual Machine
(PVM) [6], and Message Passing Interface (MPI)
• One of the attractive features of clusters was that the computational power of
commodity machines could be leveraged to solve problems that were previously
manageable only on expensive supercomputers.
• Moreover, clusters could be easily extended if more computational power was
required.
• Grids. Grid computing appeared in the early 1990s as an evolution of cluster
computing.
• In an analogy to the power grid, grid computing proposed a new approach to
access large computational power, huge storage facilities, and a variety of services.
• Users can “consume” resources in the same way as they use other utilities such as
power, gas, and water.
• Grids initially developed as aggregations of geographically dispersed clusters by
means of Internet connections.
• clusters belonged to different organizations, and arrangements were made among
them to share the computational power.
• Different from a “large cluster,” a computing grid was a dynamic aggregation of
heterogeneous computing nodes, and its scale was nationwide or even worldwide.
• Several developments made possible the diffusion of computing grids: (a) clusters
became quite common resources; (b) they were often underutilized; (c) new
problems were requiring computational power that went beyond the capability of
single clusters; and (d) the improvements in networking and the diffusion of the
Internet made possible long-distance, high-bandwidth connectivity.
• All these elements led to the development of grids, which now serve a multitude
• Introduction to Web 2.0
• The Web is the primary interface for delivering cloud
services.
• Modern web technologies support interactive
information sharing, collaboration, and application
development.
• Definition: Web 2.0 is a term used to describe a new
approach in designing applications for the Internet.
• Transformation: It has shifted the web from a static
platform to a rich, dynamic environment for user
interaction.
Key Features of Web 2.0
• Interactivity & Flexibility: Web 2.0
applications are highly interactive, offering a
desktop-like experience online.
• User Contribution: Users are not just
consumers but also providers of content.
• Continuous Updates: Web 2.0 apps are
dynamic, constantly evolving without needing
user-side software updates.
Web 2.0 Technologies
• Technologies Driving Web 2.0:
– XML
– AJAX (Asynchronous JavaScript and XML)
– Web Services
• Benefit: These technologies enable richer,
more interactive user experiences.
Device Accesibility
• Point: Web services are now accessible on a variety of
devices.
• Examples:
– Mobile phones
– Car dashboards
– TV sets
• Importance: This broad access opens up new markets
and opportunities.
• Web 2.0 applications are highly dynamic.
• Features are continuously updated based on user
feedback, without the need for redeployment on client
devices.
• Lightweight Deployment: Web applications can
be accessed via browsers without heavy software
installations.
• Loose Coupling: New applications can be
synthesized by combining existing services,
providing added value.
• Web 2.0 applications target the broadest possible
user base.
• They are designed to be accessible and affordable
for a wide range of users.
• Examples:
• Google Docs
• Google Maps
• Flickr
• Facebook
• Twitter
• YouTube
• Blogger
• Wikipedia
• Social networks are among the biggest
beneficiaries of Web 2.0.
• Technologies Used:
• AJAX
• RSS (Really Simple Syndication)
• Facebook, Flickr, and Blogger all rely on user-
generated content.
• Web 2.0 continues to be a key driver in the
evolution of cloud-based services.
Service-oriented computing

• SOC is a paradigm for building rapid, low-cost, flexible,


interoperable, and evolvable systems.
• Services act as self-describing, platform-agnostic
components that can perform functions ranging from
simple tasks to complex business processes.
• These services can be exposed via network-accessible
protocols and should be loosely coupled, reusable,
programming language independent, and location
transparent.
• services are composed and aggregated into SOA, which
organizes software systems to provide services to users
through discoverable interfaces over a network.
• Quality of Service (QoS):Represents a set of
functional and nonfunctional attributes, such
as performance (e.g., response time), security,
reliability, and availability.
• QoS requirements are defined between a
client and provider through Service Level
Agreements (SLAs).
Software as a Service
• SaaS is a software delivery model where software
solutions are provided as services over a network.
• The SaaS model has evolved from Application Service
Providers (ASPs), with SOC enabling the delivery of
software components on a subscription basis.
• SaaS allows for multitenancy, which enables
economies of scale, and it lets users consume
individual services instead of entire applications.
• This approach enables flexible and scalable
development, allowing systems and applications to be
composed dynamically and services to be reused
across platforms.
Virtualization
• The term virtualization is often synonymous
with hardware virtualization, which plays a
fundamental role in efficiently delivering
Infrastructure-as-a-Service (IaaS) solutions for
cloud computing.
• provides virtual environments at the operating
system level, the programming language level,
and the application level
Virtualization
• Increased performance and computing
capacity
• Underutilized hardware and software
resources
• Lack of space.
• Greening initiatives.
• Rise of administrative costs
Characteristics of virtualized
environments
• Virtualization refers to the creation of a virtual version of
something, hardware, a software environment, storage, or
a network.
• In a virtualized environment there are three major
components: guest, host, and virtualization layer.
• The guest represents the system component that interacts
with the virtualization layer rather than with the host
• The host represents the original environment where the
guest is supposed to be managed.
• The virtualization layer is responsible for recreating the
same or a different environment where the guest will
operate.
• The most intuitive one is hardware virtualization,
which constitutes the original realization of the
virtualization concept.
• In the case of hardware virtualization, the guest
is represented by a system image comprising an
operating system and installed applications.
• They are installed on top of virtual hardware that
is controlled and managed by the virtualization
layer, also called the virtual machine manager.
Increased security
• The ability to control the execution of a guest in a
completely transparent manner opens new pos sibilities for
delivering a secure, controlled execution environment.
• All the operations of the guest are performed against the
virtual machine, which then translates and applies them to
the host.
• This level of indirection allows the virtual machine manager
to control and filter the activity of the guest, thus
preventing some harmful operations from being
performed.
• Resources exposed by the host can then be hidden or
simply protected from the guest.
Managed execution
• Virtualization of the execution environment not
only allows increased security, but a wider range
of features also can be implemented.
• Sharing-Virtualization allows the creation of a
separate computing environments within the
same host.
• In this way it is possible to fully exploit the
capabilities of a powerful guest, which would
otherwise be underutilized.
• sharing is a particularly important feature in
virtualized data centers,
• Aggregation. Not only is it possible to share physical
resource among several guests, but virtualization also
allows aggregation, which is the opposite process.
• A group of separate hosts can be tied together and
represented to guests as a single virtual host.
• harnesses the physical resources of a homogeneous group
of machines and represents them as a single resource.
• Emulation. Guest programs are executed within an
environment that is controlled by the virtualization layer,
which ultimately is a program.
• This allows for controlling and tuning the environment that
is exposed to guests.
• Isolation. Virtualization allows providing guests—
whether they are operating systems, applications,
or other entities—with a completely separate
environment, in which they are executed.
• The guest program performs its activity by
interacting with an abstraction layer, which
provides access to the underlying resources.
• Another important capability enabled by
virtualization is performance tuning.
Taxonomy of virtualization techniques
• Virtualization covers a wide range of emulation techniques
that are applied to different areas of computing.
• A classification of these techniques helps us better
understand their characteristics.
• Virtualization is mainly used to emulate execution
environments, storage, and networks.
• Process-level techniques are implemented on top of an
existing operating system, which has full control of the
hardware.
• System-level techniques are implemented directly on
hardware and do not require—or require a minimum of
support from—an existing operating system.
Execution Virtualization
• Execution virtualization involves techniques that create
a separate environment to run programs, different
from the main system hosting the virtualization.
• These techniques focus on supporting the execution of
various programs, such as operating systems, software
compiled for abstract machine models, or applications.
• Virtualization can be applied directly through the
hardware, the operating system, applications, or even
libraries that are linked to a program, either
dynamically or statically.
1. Virtualization:
- Virtualization replaces one layer in the computing system and handles the
commands meant for that layer.
- Keeping layers separate makes it easier to manage each layer by focusing
only on how it interacts with the others.

2. Computing System Layers:


- Modern computing systems have different layers that work together.

3. Hardware Layer (ISA):


- The bottom layer is the Instruction Set Architecture (ISA), which defines
how the hardware (like the processor, memory, and interrupts) works.
- ISA is the connection between hardware and software.
4. System ISA vs. User ISA:
- System ISA is important for operating system developers.
- User ISA is for developers working on applications that directly use
the hardware.

5. Application Binary Interface (ABI):


- The ABI is a middle layer between the operating system and
applications.
- It handles things like data types and how functions are called,
allowing programs to work across different operating systems that
support the same ABI.

6. Application Programming Interface (API): The API is the top layer,


connecting applications to libraries or the operating system.
• For any operation to be performed in the application level
API, ABI and ISA are responsible for making it happen.
• The high-level abstraction is converted into machine-level
instructions to per form the actual operations supported by
the processor.
• The machine-level resources, such as processor registers
and main memory capacities, are used to perform the
operation at the hardware level of the central processing
unit (CPU).
• This layered approach simplifies the development and
implementation of computing systems and simplifies the
implementation of multitasking and the coexistence of
multiple executing environments.
1. Instruction Set Security Classes:
- Instructions are divided into two main categories: privileged and non-
privileged.

2. Non-privileged Instructions:
- These are safe to use without affecting other tasks since they don’t access
shared resources.
- Examples include instructions for math operations (floating-point, fixed-
point, arithmetic).

3. Privileged Instructions:
- These are restricted because they control sensitive system operations.
- Behavior-sensitive instructions handle input/output (I/O) operations.
- Control-sensitive instructions change the state of CPU registers.
4. Privilege Levels:
- Some systems have more than one level of privileged instructions,
using a hierarchy to control access.
- A common implementation uses rings of privilege:
- Ring 0: Most privileged, used by the OS kernel.
- Ring 1 and Ring 2: Used by OS services.
- Ring 3: Least privileged, used by regular user applications.

5. Simplified Privilege Levels:


- Modern systems often simplify this with just two levels:
- Ring 0 (supervisor mode) for the OS.
- Ring 3 (user mode) for regular user programs.
• All the current systems support two different execution modes:
supervisor mode and user mode.
• The first mode denotes an execution mode in which all the
instructions (privileged and non-privileged) can be executed
without any restriction. (master mode or kernel mode), is generally
used by the operating system (the hypervisor) to perform sensitive
operations on hardware level resources.
• In user mode, there are restrictions to control the machine-level
resources.
• If code running in user mode invokes the privileged instructions,
hardware interrupts occur and trap the potentially harmful
execution of the instruction.
• hypervisors run in supervisor mode, division between privileged
and nonprivileged instructions has posed challenges in designing
virtual machine managers.
Hardware-level virtualization
• Hardware-level virtualization/system
virtualization, since it provides ISA to virtual
machines, which is the representation of the
hardware interface of a system.
• This is to differentiate it from process virtual
machines, which expose ABI to virtual
machines.
Hypervisors
• A fundamental element of hardware
virtualization is the hypervisor, or virtual
machine manager (VMM).
• It recreates a hardware environment in which
guest operating systems are installed.
• There are two major types of hypervisor: Type
I and Type II
Type I Hypervisors:
• They run directly on computer hardware,
rather than the operating system.
• They interact with the hardware’s instruction
set and create virtual environments for
different operating systems to run. .
• Also called native virtual machines because
they run directly on the hardware without any
intermediary.
• Type II Hypervisors run on top of an existing
operating system.
• They rely on the operating system to provide
virtualization services.They communicate with
the OS using the Application Binary Interface
(ABI).
• They emulate hardware so that guest operating
systems can run in virtual environments.
• Also known as hosted virtual machines because
they are hosted within the operating system.
A virtual machine manager is organized into three main
parts:
• Dispatcher: Acts as the entry point and redirects
instructions from the virtual machine to the other two
modules.
• Allocator: Decides which system resources the virtual
machine (VM) will use. It is called by the dispatcher
when the VM tries to change its resources.
• Interpreter: Contains routines that run when the VM
executes a privileged instruction. When this happens, a
trap is triggered, and the corresponding routine is
executed.
• The criteria that need to be met by a virtual machine
manager to efficiently support virtualization.
• Equivalence. A guest running under the control of a
virtual machine manager should exhibit the same
behavior as when it is executed directly on the physical
host.
• Resource control. The virtual machine manager should
be in complete control of virtualized resources.
• Efficiency. A statistically dominant fraction of the
machine instructions should be executed without
intervention from the virtual machine manager.
Xen: paravirtualization
Xen: paravirtualization
• Xen is an open-source project that provides a platform for
virtualization, initially developed by researchers at the University of
Cambridge.
• Xen is used for both desktop and server virtualization, and it's also
employed in cloud computing through the Xen Cloud Platform
(XCP).
• The core technology behind Xen is the Xen Hypervisor, which
allows multiple operating systems to run on the same hardware.
• Originally, Xen used paravirtualization, os modified of guest .
• This approach avoids the slowdown typically caused by managing
certain types of instructions in traditional full virtualization.
• However, newer versions of Xen also support full virtualization with
the help of modern hardware features, allowing unmodified
operating systems to run as well.
• The diagram depicts the Xen architecture and
how it manages guest operating systems (OS)
through different domains and privilege levels,
known as "rings.“
Xen Hypervisor (VMM - Virtual
Machine Monitor):
• The Xen hypervisor is the core component responsible
for managing hardware resources and running virtual
machines (VMs).
• It operates in Ring 0, the highest privilege level, where
it controls direct access to hardware like CPU, memory,
and I/O devices.
• The hypervisor handles privileged instructions (special
commands that interact with hardware) from guest
operating systems through hardware traps.
• These are signals to the hypervisor whenever a guest
OS tries to perform an operation that requires direct
hardware access.
User Domains (Domain U)
• Domain U represents the virtual machines or guest
operating systems.
• These OS instances are typically paravirtualized,
meaning they've been modified to work efficiently with
the Xen hypervisor.
• Guest OS make hypercalls (a kind of optimized system
call) to interact with the Xen hypervisor for tasks that
require hardware management.
• The guest OS runs in lower privilege levels, usually Ring
1 or Ring 2, to prevent them from directly accessing
hardware. Only the hypervisor, in Ring 0, can do that.
User Applications:
• User applications that run on guest operating
systems do not need any modifications. They
interact with the OS using standard Application
Binary Interfaces (ABI).
• These applications run in Ring 3, the lowest
privilege level, which is standard for user-level
processes in modern operating systems.
• This isolation ensures that user applications can't
directly interact with the hardware or affect the
system's stability.
Management Domain (Domain 0):

• Domain 0 (Dom0) is a special domain that has


direct access to the Xen hypervisor for managing
VMs. It is the first domain started by the Xen
hypervisor and has full access to the system’s
hardware and administrative privileges.
• Dom0 handles virtual machine management
tasks, including creating, destroying, and
controlling guest OS instances (Domain U). It also
has access to the hypervisor through an HTTP
interface or other management tools.
Rings in CPU Architecture:
• In x86 systems, the concept of privilege levels (rings)
determines what kind of operations an OS or application
can perform:
• Ring 0: The most privileged level, where the Xen hypervisor
operates. It has full access to hardware and critical system
functions.
• Rings 1 and 2: Intermediate privilege levels where the
guest OS might run. These levels are less privileged than
Ring 0, which helps isolate them from direct hardware
access.
• Ring 3: The least privileged level, where user applications
run. These applications depend on the OS for access to
hardware.
VMware: full virtualization
• VMware’s technology is based on the concept
of full virtualization, where the underlying
hardware is replicated and made available to
the guest operating system, which runs
unaware of such abstraction layers and does
not need to be modified.
Full virtualization and binary
translation
End-user (desktop) virtualization
End-user (desktop) virtualization
• VMware helps run multiple operating systems or applications on a
single computer.
• The most popular use is running a different operating system, like
Windows or Linux, inside a computer that already has its own
system (like Mac or Windows).
• This creates a "virtual" machine, which is like a separate computer
running inside your main computer.
• VMware has two main programs: VMware Workstation (for
Windows) and VMware Fusion (for Mac or Linux). These programs
let you create and manage these virtual machines.
• While running a virtual machine, you can still use your computer's
hardware, like USB devices, share files, and even interact with the
virtual machine’s screen as if it were just another program.
• This is done using an application installed on your computer that manages
how the virtual system interacts with the real hardware.
• VMware installs a special driver on your main system (host OS) that does
two things:
– It sets up a virtual machine manager (VMM) that handles the virtual system in
a secure and controlled way.
– It helps VMware manage things like input/output (I/O) requests (such as using
USBs or other devices) by communicating with the main system.

• This setup, called the Hosted Virtual Machine Architecture, keeps the
virtual system separate from the main one and ensures it runs smoothly.
• The VMware software only needs to get involved when something tricky
happens, like accessing hardware, but for normal tasks, the VMM controls
the CPU and memory directly.
• The virtual machines you create are saved as
files on your computer, and you can do things
like:
• Pause them
• Take snapshots to save their current state
• Roll back to an earlier point if something goes
wrong
Pros and cons of virtualization
• Virtualization offers several important benefits,
especially in managing and isolating tasks.
• By creating virtual environments, harmful
operations can be prevented from affecting the
main system.
• virtualization makes it easier to allocate and
share resources between virtual machines, which
is helpful in combining multiple servers into one.
• Portability, Virtual machines are like files you can easily move between
computers, and they don’t rely on anything other than the software that
runs them. This makes them easy to manage and transfer, just like how a
Java program can run anywhere if there’s a Java virtual machine installed.

• You can even carry your entire operating environment on a virtual


machine, making it feel like you have your own laptop wherever you go.
• Virtualization reduces maintenance costs because fewer physical
machines are needed. Virtual machines run in their own environment, so
they have limited ability to cause damage to the actual hardware.
• Finally, by means of virtualization it is possible to achieve a more efficient
use of resources. Multiple systems can securely coexist and share the
resources of the underlying host, without inter fering with each other.
The other side of the coin:
disadvantages
• 1)Performance Issues: Virtualization can slow down systems because it
adds a layer between the guest (virtual machine) and the host (physical
machine), which can increase delays(latency).
• Hardware Virtualization: In this type of virtualization, where the virtual
machine mimics a full system:
– Keeping track of the virtual machine's processor state can cause delays.
– Handling special instructions and memory management adds overhead.
– Running console functions takes extra time.
• Shared Resources: If the virtual machine manager runs alongside other
programs on the host system, it competes for resources like CPU and
memory, which can slow things down.
• Improving Performance: Advancements in technology are making these
issues less of a problem.
• Techniques like paravirtualization can speed things up by letting the guest
program use the host more efficiently.
Inefficiency and degraded user
experience
• Inefficient Use of Host Resources: Some host features may
not be accessible in a virtualized environment due to the
abstraction layer.
• Hardware Virtualization: For example, device drivers, like
graphics cards, may only offer basic features in a virtual
machine, even if the host has more advanced capabilities.
• Programming-Level Virtual Machines: Some features of
the host's operating system might not be available unless
specific libraries are used.
• Java Example: Early versions of Java had limited graphic
programming features, making applications look worse
than native ones. This was later improved with the Swing
framework and OpenGL support.
Security holes and new threats
• Virtualization Phishing: Virtualization opens up new ways for phishing
attacks, where malicious programs can extract sensitive information from
the guest system.
• Hardware Virtualization Attacks: Malicious programs can load before the
operating system, acting as a virtual machine manager and controlling the
OS to steal data. Examples include:
– BluePill: Targets AMD processors and moves the OS into a virtual machine.
– SubVirt: Infects the guest OS and takes control when the virtual machine
reboots.
• Vulnerable Hardware: Older CPUs and hardware weren’t designed with
virtualization in mind, making them vulnerable. Intel and AMD have since
added virtualization support with Intel VT and AMD Pacifica.
• Programming-Level Attacks: Modified versions of programming virtual
machines can spy on memory or access sensitive data. This can happen if
malware exploits a security flaw or runs with administrative privileges.
Microsoft Hyper-V
• 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.
• 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, but their interaction
with it is controlled by either the parent partition or the hypervisor
itself.
Hypervisor
• Hypercalls Interface: The entry point for sensitive instructions in
partitions. Drivers and parent partitions use this interface to
communicate with the hypervisor and create child partitions.
• Memory Service Routines (MSRs): Manages memory access from
partitions using hardware-assisted virtualization
• Advanced Programmable Interrupt Controller (APIC): Manages
hardware interrupts.
• Scheduler: Assigns virtual processors to physical processors,
following policies set by the parent partition.
• Address Manager: Manages virtual network addresses for each
guest operating system.
• Partition Manager: Handles creating, configuring, and managing
partitions through the hypercalls interface API.
Enlightened I/O and synthetic devices
• Enlightened I/O: This technology optimizes I/O operations
by enabling guest operating systems to use a
communication channel between partitions instead of
relying on hardware emulation.
• Inter-partition Communication: It allows data exchange
between child and parent partitions, making I/O operations
more efficient.
• Virtual Device Drivers: Enlightened I/O is primarily used for
implementing virtual device drivers in guest operating
systems that are aware of the hypervisor.
• VMBus: This interpartition communication channel is
facilitated by VMBus, enhancing performance for
hypervisor-aware systems.
Parent partition
• Host OS: The parent partition runs Windows Server
2008 R2 and manages virtual machines.
• Device Drivers: It directly uses device drivers and
shares them with child partitions.
• Child Management: It creates and manages child
partitions through the Virtualization Infrastructure
Driver (VID).
• VM Worker Process: Each child partition has a process
(VMWP) in the parent to handle communication with
the hypervisor.
• Remote Access: Management services can be accessed
remotely using a WMI provider.
Child partitions
• Child partitions are used to execute guest
operating systems.
• These are isolated environments that allow
secure and controlled execution of guests.
• Two types of child partition exist, they differ
on whether the guest operating system is
supported by Hyper-V or not.
• These are called Enlightened and
Unenlightened partitions, respectively.

You might also like