You are on page 1of 60

Course Name : Distributed Systems

Course Code : CSE 2052


Module 1: Introduction to
Distributed Systems

1
The Rise of Distributed Systems
• Computer hardware prices falling, power increasing
• If cars the same, Rolls Royce would cost 1 dollar and get 1 billion miles per
gallon (with 200 page manual to open the door)

• Network connectivity increasing


• Everyone is connected with fat pipes

• It is easy to connect hardware together

• Definition: a distributed system is


• A collection of independent computers that appears to its users as a
single coherent system.
The Rise of Distributed Systems
•Definition: a distributed system is
• A collection of independent computers that
appears to its users as a single coherent
system.
Definition of a Distributed System

Examples:
-The Web
-Processor Pool
-Airline Reservation

A distributed system organized as middleware.


Note that the middleware layer extends over multiple machines.
Users can interact with the system in a consistent way, regardless of
where the interaction takes place
Distributed System
Definition
A distributed system is a collection of autonomous
computing elements that appears to its users as a single
coherent system.

Characteristic features
Autonomous computing elements, also referred to as
nodes, be they hardware devices or software
processes.

Single coherent system: users or applications perceive


a single system ⇒nodes need to collaborate.
Distributed Systems (DS)
• Consists of several computers that do not share memory or a clock
• Computers communicate with each other by exchanging messages over
a communication network
• Each computer has its own memory
• Each computer runs its own operating systems
• The resources owned and controlled by a computer are said to be local
to it
• The resources owned and controlled by other computers and those
that can be accessed through the network are said to be remote
• The terms computer, node, host, site, machines, processor and work
station are used interchangeably

6
What is a Distributed System?
Emmerich(1997):

A distributed system consists of a collection of


autonomous computers, connected through a network and
distribution middleware, which enables computers to
coordinate their activities and to share the resources of
the system, so that users perceive the system as a single,
integrated computing facility.
7
What is a Distributed System?
Sinha (1997):

is a collection of processors interconnected by a


communication network in which each processor has its own
local memory and others peripherals, and the communication
between two processors of the system takes place by
message passing over the communication network. Points
over the local and remote resources.
8
What is a Distributed System?
Colouris et al. (2001):

Is a system in which hardware or


software components located at
networked computers communicate and
coordinate their actions only by message
passing.
9
Centralized vs Distributed System
• Centralised
1. One component with non-autonomous parts
2. Component shared by users all the time
3. All resources accessible
4. Software runs in a single process
5. Single Point of control
6. Single Point of failure

• Distributed
1. Multiple autonomous components
2. Components are not shared by all users
3. Resources may not be accessible
4. Software runs in concurrent processes on different processors
5. Multiple Points of control
6. Multiple Points of failure 10
Motivation
• Powerful stand alone systems satisfies user needs by
providing bit mapped display and visual interfaces, which
traditional time sharing mainframe systems do not
support

• Significant advances in communication technologies

• When a group of people work together, they need to


communicate, to share data, to share expensive resources
11
Motivation (cont.)
• Designing interconnecting computers and resources is
feasible
• with the availability of cheap and powerful micro processors and

• advances in communication technology

• Interconnected computers have enormous power but cost is


only few thousands dollars compare to a single machine of
Million dollar

• Main advantage is decisive power/performance advantage over


traditional time sharing systems 12
Characteristics of a Distributed System
• Absence of a shared clock
• It is impossible to synchronize the clocks different processors precisely
• Because uncertainty in communication between them

• Absence of shared memory

• Absence of accurate failure detection


• In an asynchronous distributed system, it is impossible to distinguish
between a slow processor and failed processor

• a DS is asynchronous, if there is no upper bound on message communication


time 13
Common Characteristics

• Resource Sharing
• Openness
• Concurrency
• Scalability
• Fault Tolerance
• Transparency

14
Transparency
Distributed systems should be perceived by
users and application programmers as a whole
Transparencies
•Access transparency: enables local and remote resources to be accessed
using identical operations.
•Location transparency: enables resources to be accessed without knowledge
of their location.
•Concurrency transparency: enables several processes to operate
concurrently using shared resources without interference between them.
•Replication transparency: enables multiple instances of resources to be used
to increase reliability and performance without knowledge of the replicas by
users or application programmers.

16
Transparencies(cont)
•Failure transparency: enables the concealment of faults, allowing users and
application programs to complete their tasks despite the failure of hardware
or software components.
•Mobility transparency: allows the movement of resources and clients within a
system without affecting the operation of users or programs.
•Performance transparency: allows the system to be reconfigured to improve
performance as loads vary.
•Scaling transparency: allows the system and applications to expand in scale
without change to the system structure or the application algorithms.

17
Software Concepts
System Description Main Goal
Tightly-coupled operating system for multi- Hide and manage
DOS
processors and homogeneous multicomputers hardware resources
Loosely-coupled operating system for
Offer local services
NOS heterogeneous multicomputers (LAN and
to remote clients
WAN)
Additional layer atop of NOS implementing Provide distribution
Middleware
general-purpose services transparency

• DOS (Distributed Operating Systems)


• NOS (Network Operating Systems)
• Middleware
Uniprocessor Operating Systems

• Separating applications from operating system


code through a microkernel
• Can extend to multiple computers
Multicomputer Operating Systems

• But no longer have shared memory

• Can try to provide distributed shared memory


• Tough, coming up

• Can provide message passing


Multicomputer Operating Systems

(optional) (optional)

• Message passing primitives vary widely between systems


• Example: consider buffering and synchronization
Multicomputer Operating Systems
Reliable comm.
Synchronization point Send buffer
guaranteed?
Block sender until buffer not full Yes Not necessary
Block sender until message sent No Not necessary
Block sender until message received No Necessary
Block sender until message delivered No Necessary

• Relation between blocking, buffering, and reliable communications.

• These issues make synchronization harder. It was easier when we


had shared memory.
• So … distributed shared memory
Design Goals

Support sharing of resources


Distribution transparency
Openness
Scalability
Sharing resources
Canonical examples

Cloud-based shared storage and files


Peer-to-peer assisted multimedia streaming
Shared mail services (think of outsourced mail systems)
Shared Web hosting (think of content distribution networks)

Observation

“The network is the computer”


(quote from John Gage, then at Sun Microsystems)
Distribution transparency
Types
Transparency Description

Access Hide differences in data representation and how


an object is accessed
Location Hide where an object is located

Relocation Hide that an object may be moved to another


location while in use
Migration Hide that an object may move to another location
Replication Hide that an object is replicated

Concurrency Hide that an object may be shared by several


independent users
Failure Hide the failure and recovery of an object
Degree of transparency
Observation
Aiming at full distribution transparency may be too much:
There are communication latencies that cannot be hidden .
Completely hiding failures of networks and nodes is (theoretically
and practically) impossible
You cannot distinguish a slow computer from a failing one
You can never be sure that a server actually performed an operatio
before a crash
Full transparency will cost performance, exposing distribution of
the system
Keeping replicas exactly up-to-date with the master takes time
Immediately flushing write operations to disk for fault
tolerance
Degree of transparency
Exposing distribution may be good
• Making use of location-based services (finding your
nearby friends) When dealing with users in different
time zones
• When it makes it easier for a user to understand what’s
going on (when e.g., a server does not respond for a long
time, report it as failing).

Conclusion
• Distribution transparency is a nice a goal, but achieving it is a
different story, and it should often not even be aimed at.
Openness of distributed systems
What are we talking about?

Be able to interact with services from other open systems, irrespective of the
underlying environment:

• Systems should conform to well-defined interfaces

• Systems should easily interoperate


• Systems should support portability of applications
• Systems should be easily extensible
Scale in distributed systems
Observation
Many developers of modern distributed systems easily use the adjective
“scalable” without making clear why their system actually scales.

At least three components


Number of users and/or processes (size scalability)
Maximum distance between nodes (geographical scalability)
Number of administrative domains (administrative scalability)

Observation
Most systems account only, to a certain extent, for size scalability. Often a
solution: multiple powerful servers operating independently in parallel. Today, the
challenge still lies in geographical and administrative scalability.
Developing distributed systems: Pitfalls
Observation
Many distributed systems are needlessly complex caused by
mistakes that required patching later on. Many false assumptions
are often made.
False (and often hidden) assumptions
❑ The network is reliable
❑ The network is secure
❑ The network is homogeneous
❑ The topology does not change
❑ Latency is zero
❑ Bandwidth is infinite
❑ Transport cost is zero
❑ There is one administrator
Architecture of a Distributed Systems (DS)

IBM Compatible Hand held computer


IBM Compatible

Laptop computer
Communication network
Infrastructure based network (wired/wire less)
IBM Compatible
Infrastructure based network (short range wire less)

Tower PC Cell phone

Workstation

IBM Compatible
Server
Software and hardware service layers in
distributed systems

Applications, services

Middleware

Operating system
Platform

Computer and network hardware

39
A working Model of a distributed system

40
Advantages of DS over traditional time
sharing systems
• Resource sharing

• Enhanced performance

• Improved reliability and availability

• Modular expandability

41
Distributed Computing (DC)

• Distributed computing is a science which solves a large


problem by giving small parts of the problem to many
computers to solve and then combining the solutions for the
parts into a solution for the problem.

42
Distributed Computing

• Recent distributed computing projects have been designed


to use the computers of hundreds of thousands of
volunteers all over the world, via the Internet, to look for
extra-terrestrial radio signals, to look for prime numbers so
large that they have more than ten million digits, and to find
more effective drugs to fight the AIDS virus.

43
Distributed Computing
• These projects are so large, and require so much computing
power to solve, that they would be impossible for any one
computer or person to solve in a reasonable amount of time.

44
Distributed Systems vs. parallel systems
• Scalability
• DS are more inherently more scalable

• Parallel systems shared memory becomes a bottleneck when the number of processors is
increased

• Modularity and heterogeneity


• DS is more flexible because a single processor can be added or deleted easily

• The processor can be of a completely different than existing processor

• Data sharing
• Multiple organizations can share their data with each other 45
Distributed Systems vs. parallel systems
• Resource sharing
• Expensive special purpose processor can be shared by multiple organization

• Geographical structure
• An application can be inherently distributed

• Reliability
• Failure of a computer does not affect the availability of others

• Low cost
• Availability of high-bandwidth networks

• Inexpensive workstations
46
Network Operating System

• OSes can be different (Windows or Linux)

• Typical services: rlogin, rcp


• Fairly primitive way to share files
Network Operating System

• Can have one computer provide files transparently for


others (NFS)
• (try a “df” on the WPI hosts to see. Similar to a “mount
network drive” in Windows)
Network Operating System

• Different clients may mount the servers in different places


• Inconsistencies in view make NOSes harder, in general for users
than DOSes.
• But easier to scale by adding computers
Positioning Middleware
• Network OS not
transparent. Distributed
OS not independent
computers.
• Middleware can help
• Much middleware built in-
house to help use
networked operating
systems (distributed
transactions, better comm,
RPC)
• Unfortunately, many
different standards
Middleware and Openness

1.23

• In an open middleware-based distributed system, the


protocols used by each middleware layer should be the same,
as well as the interfaces they offer to applications.
• If different, compatibility issues
• If incomplete, then users build their own or use lower-layer
services (frowned upon)
Comparison between Systems
Distributed OS Network Middleware-
Item
Multiproc. Multicomp. OS based OS
Degree of transparency Very High High Low High
Same OS on all nodes Yes Yes No No
Number of copies of OS 1 N N N
Basis for communication Shared memory Messages Files Model specific
Resource management Global, central Global, distributed Per node Per node
Scalability No Moderately Yes Varies
Openness Closed Closed Open Open

• DOS most transparent, but closed and only moderately scalable


• NOS not so transparent, but open and scalable
• Middleware provides a bit more transparency than NOS
Types of Distributed Systems
Distributed systems are generally known by the
Operating system (OS) they run.
The ability to run one OS does not imply the ability to run
others.
• Unix - A family of OS’s originally developed by
AT&T in the late ‘60’s
• Many brands available today
• Those that support a wide variety of platforms are
called Open System.
• Most are proprietary.
53
Types of Distributed Systems (cont.)
• Windows - A proprietary OS patterned after the
Apple OS in the late 80’s
• Also known as Intel systems
• Linux - An Open System OS patterned after Unix
• Will run on most platforms
• As each computer manufacturer created their own Unix
OS, Unix became less open.
• Linux was created to return Open Systems capability to
the market.
54
Interoperability
• Each OS has its own proprietary software code structure
• A program written for a Windows system is not transferable to
a Unix or Linux system with out modification
• A program written using the Open Systems standards for Unix
will run on most any Unix
• A program written for a proprietary version of Unix is not
transferable to other Unix’s without modification
• Some of the proprietary versions of Unix are HP-UX, Solaris, AIX and
True64 55
Interoperability (cont.)
• Interaction between dissimilar systems requires an interface
program, who’s function it is to interpret each systems request

• Each OS has its own proprietary file structure


• They can not read each others data without an interpreter
• Database products designed for each OS system do not have
commercially available interpreters

56
Architectures
• Distributed Systems Architectures are comprised of the
OS Environment and the Configuration

• Distributed System Architecture Configurations are


identified as one, two or three-tier
• The Client, or Desktop device, is not considered a tier
• The Client contains the Graphical User Interface (GUI)
software, which displays the data in an easy to read method.
57
Architectures (cont.)
• The most efficient, and usually expensive, configuration is a Three-
tier, which consists of

• Tier-one - The database server, which gathers the requested information


from a data repository (i.e. DB2, Oracle, Sybase)

• Tier-two - The application server, which processes the software managing


the information (i.e. PeopleSoft, SAP, e-mail)

• Tier-three - The presentation server, which structures the data for display.
This tier will also collect metrics as requested
Architectures (Cont.)
• The most used configuration is a Two-tier, which consists of

• Tier-one - The database server


• Tier-two - Combination of application and presentation server

• The lowest cost, and most inefficient, configuration is a One-tier, which


consists of

• Tier-one - The database, applications and presentation running on one server


• An additional configuration, which has very limited use, is called a Discrete
System
• The database. applications, presentation and GUI are contained on the Client

59
Architectures - Configuration Comparison

Performance Good Good Excellent Good

Cost Low Medium High Lowest

Reliability
Medium High Highest Medium

One-Tier Two-Tier Three-Tier Discrete

60

You might also like