Lec 1 Introduction
Lec 1 Introduction
Distributed Systems
➢ Introduction
➢ Trends in distributed systems
➢ Challenges of distributed system
➢ Architectural models
➢ Fundamental models
➢ Types of distributed systems
Introduction
Starting from1980s, two advances in technology began to
change.
Development of powerful microprocessors
8-bit machines, but soon 16-, 32-, and 64-bit
Invention of high-speed computer networks (LANs)
Data can be moved between machines at rates of 100 million to 10
billion bits/sec.
WANs allow millions of machines all over the earth to be
connected
These technologies make it easy to put computing systems
composed of large numbers of computers connected by a high-
speed network together.
Definition of DS
Distributed system is one in which hardware or software
components located at networked computers communicate and
coordinate their actions only by passing messages.
Typical characteristics of DS include Concurrency, No global clock and
Independent failures
Concurrency
In a network of computers, program is executed concurrently.
No global clock
Close coordination depends on a shared idea of the time at which the
programs’ actions occur.
But there are limits to the accuracy to synchronize.
There is no single global notion of the correct time.
The only communication is by sending messages through a network.
Definition of DS
Independent failures
Faults result in the isolation of the computers.
But the system does not stop running.
Each component of the system can fail independently, leaving
the others still running.
Other definition of DS
A distributed system is a collection of independent computers
that appears to its users as a single coherent system.
From this definition;
A distributed system consists of computers that are autonomous.
Users think they are dealing with a single system.
Definition of DS
To support heterogeneous computers and networks while
offering a single-system view, DSs are organized by means of
a layer of software.
A distributed system is sometimes called middleware.
Each application is offered the same interface.
The distributed system provides the means for components of
a single distributed application to communicate with each
other
And also to let different applications communicate.
It hides the differences in hardware and operating systems
from each application.
The prime motivation for using distributed systems is a desire
to share resources.
Network vs Distributed Operating
System
The network operating system is the platform to run a
system software on a server and allow the server to manage
the users, data, groups, security, applications and other
networking functions.
It is the primary form of an operating system for the
distributed architecture.
The goal for the network operating system is to permit
resource sharing among two or more computers operating
under their own OSs.
Network vs Distributed Operating
System
The distributed operating system handles a group of
independent computers and makes them look like an
ordinary centralized operating system.
This is achieved by enabling the proper communication
between the different computers connected with each other.
The main aim of the distributed operating system is the
transparency where the use of multiple hardware resources is
hidden from the users.
The distributed operating system is less autonomous than
network operating system.
Network Operating System Distributed Operating System
A network operating system is made up of
A distributed operating system is an
software and associated protocols that
ordinary centralized operating system but
allow a set of computer network to be
runs on multiple independent CPUs.
used together.
Environment users are aware of Environment users are not aware of
multiplicity of machines. multiplicity of machines.
Control over file placement is done It can be done automatically by the
manually by the user. system itself.
It is more reliable or fault tolerant i.e
Performance is badly affected if certain distributed operating system performs
part of the hardware starts malfunctioning. even if certain part of the hardware starts
malfunctioning.
Remote resources are accessed by either
logging into the desired remote machine Users access remote resources in the same
or transferring data from the remote manner as they access local resources.
machine to user's own machines.
Distributed Operating
Basis for comparison Network Operating System
System
Provision of local services to Management of hardware
Objective
the remote client. resource.
Loosely coupled system Tightly coupled system used
Use employed in heterogeneous in multiprocessor and
computers. homogeneous computers.
2-tier client/server N-tier client/server
Architecture
architecture. architecture.
Level of transparency Low High
Basis for communication Files Shared memory and messages
Global central or distributed
Resource Management Handled at each node.
management.
Ease of implementation High Low
Scalability More Less or moderate.
Operating system on all nodes Can be different Same
Rate of autonomy High Low
Fault tolerance Less High
Resource Sharing
Resources are those that can be shared in a
networked computer system.
hardware
Disks and
Printers
Software
Files,
Databases and data objects
Stream of video
Audio
Resource Sharing
We share equipment such as printers and disks to
reduce costs.
Users are concerned with sharing data in the form
of a shared database or web pages.
But also we are sharing the disks and processors on
which they are implemented.
Users think in terms of shared resources such as a
search engine or a currency converter.
But without regard for the server or servers that
provide these.
Examples of distributed systems
Networks are everywhere.
the Internet
World Wide Web,
web search,
online gaming,
email,
social networks,
eCommerce, etc.
Trends in distributed systems
DSs are undergoing a period of significant change and
this can be traced back to influential trends:
Emergence of pervasive networking technology;
Emergence of ubiquitous computing ;
Increasing demand for multimedia services;
View of distributed systems as a utility.
Challenges
As the scope and scale of distributed systems and
applications is extended, challenges are encountered.
The main challenges and thus the goal of DS are:
Heterogeneity
Openness
Security
Scalability
Failure handling
Concurrency
Transparency
Openness
It determines whether the system can be extended and re-implemented
in various ways.
Openness can be achieved only if
The specification and documentation of software interfaces of a system are
made available to software developers.
The key interfaces are published.
This process is similar to the standardization of interfaces.
Next is challenging to tackle the complexity of distributed systems
consisting of many components.
Documentation such as ‘Requests For Comments’, or RFCs, are helpful.
The publication of the original Internet protocols enabled Internet
systems and applications to be built.
Open distributed systems can be extended at the:
Hardware level by the addition of computers to the network and
Software level by the introduction of new services
Security
Security for information resources has three components:
Confidentiality – protection against disclosure to unauthorized
individuals
Integrity – protection against alteration or corruption and
Availability – protection against interference with the means to access
the resources.
Security risks are associated with allowing free access to all of the
resources in an intranet.
A firewall can be used to restrict the traffic that can enter and leave
This cannot reduce risks posted
By users within an intranet or
With the appropriate use of resources in the Internet, that are not
protected by firewalls.
In a DS, clients send requests to access data from servers.
This involves sending information over a network.
Security
For example:
A doctor might request access to hospital patient data or send
additions to data.
In e-commerce and banking, users send their credit card
numbers across the Internet.
This needs sending sensitive information over a network in a
secure manner.
Security also involves knowing the identity of the user on whose
behalf a message was sent.
The server needs to know that the user is really a doctor, and
The user needs to be sure of the identity of the shop or bank.
The challenges of security can be met by the use of encryption
techniques.
Security
But, the following two security challenges have not been fully met:
Denial of service attacks
A user can disrupt a service by bombarding the service with a
large number of pointless requests.
This is called a denial of service attack.
Such attacks are countered by attempting to catch and punish the
perpetrators after the event.
Security of mobile code
Consider an executable program as an electronic mail
attachment:
The possible effects of running the program are unpredictable;
It may seem to display an interesting picture but in reality it may
access local resources,
Or it can be part of a denial of service attack.
Scalability
Distributed systems operate efficiently ranging from a small
Intranet to the Internet.
A system is scalable if it will remain effective when there is a
significant increase in the number of resources and users.
The number of computers and servers in the Internet has
increased dramatically.
The design of scalable distributed systems has the following
challenges:
Controlling the cost of physical resources
As the demand for a resource grows, it should be possible to
extend the system, at reasonable cost.
Scalability
For example, the frequency of file accessed in an intranet grows as the
number of users and computers increases.
It must be possible to add server to avoid the performance bottleneck.
For a system with n users to be scalable, the quantity of physical resources
required to support them should be at most O(n).
Controlling the performance loss
Consider a set of data whose size is proportional to the number of users.
For example;
The table with the mapping between the domain names and their Internet addresses
by DNS.
Algorithms that use hierarchic structures scale better than linear
structures.
With hierarchic structures an increase in size will result in some loss
in performance:
Time taken to access hierarchically structured data is O(log n), n is
the size set of data.
Scalability
Preventing software resources running out:
An example of lack of scalability is IP addresses.
in 1970s, it was decided to use 32 bits.
But, the supply of available Internet addresses is running
out.
Thus, a new version of the protocol with 128-bit Internet
addresses is being adopted – Ipv6.
This will require modifications to many software
components.
System Models
The properties and design issues of distributed
systems can be captured and discussed through
models.
Architectural models
They describe a system in terms of the computational
and communication tasks performed.
The computational elements are individual computers
supported by network interconnections.
Fundamental models
They take an abstract perspective to examine
individual aspects of a distributed system.
System Models
Architectural models
Architectural elements
Communicating entities
Communication paradigms
Roles and responsibilities
Placement
Architectural patterns
Layering
Tiered architectures
Thin clients
Fundamental models
Interaction models
Failure models
Security models
Architectural models
System architecture is defined as structure in
terms of separately specified components and their
interrelationships.
The goal is to ensure that the structure will meet
present and future demands.
Major concerns are to make the system
Reliable,
Manageable,
Adaptable and
Cost-effective
Architectural models
We will use the following approach:
Looking at underlying Architectural Elements
that support modern distributed systems;
Examining composite Architectural Patterns
that can be used in isolation or in combination;
Architectural elements
To understand the building blocks of a distributed
system, we need to consider four key questions:
What are the entities that are communicating in
the distributed system?
How do they communicate?
What roles and responsibilities do they have in the
overall architecture?
How are they mapped on to the physical distributed
infrastructure (their placement)?
Components
Components like objects offer problem-oriented abstractions and
are accessed through interfaces.
Components make all dependencies explicit.
The dependency provides a more complete contract for system
construction.
Web services
Web services are related to objects and components and are
accessed through interfaces.
Objects and components are used to develop tightly coupled
applications.
Web services are complete services in their own right and crossing
organizational boundaries.
Web services may be implemented by different providers and
using different technologies
Communicating Entities
What are communicating and how are central to the DS.
From a system perspective, the entities that
communicate in a DS are processes.
In sensor networks, the entities that communicate are nodes.
In most DS environments threads are endpoints of
communication.
From programming perspective more problem-oriented
abstractions have been proposed:
Objects
Objects are introduced to encourage the use of object
oriented approaches in DS.
Objects are accessed via interfaces, with an associated
interface definition language (or IDL).
Communication paradigms
Three types of communication paradigm:
Inter process communication;
Remote invocation;
Indirect communication.
Inter process communication- low level
communication between processes in DS by;
Message-passing
Access to the API offered by IP (socket programming)
and
Multicast communication.
Communication paradigms
Remote invocation covering a range of techniques
based on a two-way exchange between
communicating entities. (calling of a remote
operation, procedure or method)
Request-reply protocols
Remote procedure calls
Remote method invocation
Indirect communication techniques include:
Group communication
Publish-subscribe systems
Message queues
Tuple spaces
Distributed shared memory
Request-reply
Request-reply protocols support client-server
computing.
A pairwise exchange of messages
From client to server – containing operation with
arguments to be executed at the server and
From server back to client – containing results of the
operation
This paradigm is primitive and only used in
embedded systems where performance is
paramount.
The approach is also used in the HTTP protocol.
Remote procedure calls
In RPC, procedures in processes on remote
computers can be called as if they are in the local
address space.
The RPC system hides the encoding and decoding of
parameters and results.
RPC supports client-server with servers offering a
set of operations through a service interface and
clients calling these operations.
RPC systems offer access and location transparency.
Remote method invocation