Chapter 1
Introduction Distributed
Systems
Kanchan K Doke
Computer Engg. Department , BVCOE
Contents
2
Characterization of Distributed Systems
Issues
Goals
Types of distributed systems
Distributed System Models: Grid and Cluster
computing
Hardware concepts
Software Concept
Middleware:
Models of Middleware
Services offered by middleware
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
2 Centralized & Distributed
System
Centralized System Distributed System
3
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
4
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
5 Centralized Vs Distributed System
Sr no Centralized System Distributed System
1 Non autonomous Autonomous components
components
2 System built using System built using
homogenous technology heterogynous technology
3 Multiple users shared Components used
resources at all times extensively and executed in
concurrent processes
4 Single point control and Multiple point control and
failure failure
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
Definition 5 marks
6
A distributed system is a collection of independent
computers, interconnected via a network, capable of
collaborating on a task.
Characteristics:
No common Physical clock and memory
Enhanced Reliability
Fault tolerant
Transparent
Access to geographically remote data and resources
Scalability
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
Examples of Distributed System 2 marks
7
Telephone Networks and Cellular Networks
Computer Networks Such as internet or
intranet
ATM(bank) Machines
Distributed database and distributed
database management system
Network of Workstations
Mobile Computing etc.
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
8
A Distributed System
9
Disadvantages of Distributed System
10
Difficulties of developing distributed software
Networking problem
Security problems
Lack of shared memory
Lack of global clock
Unpredictable communication delays.
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
5 marks
Reasons/ Advantages for Distributed
Computing Systems
Inherently distributed applications
Distributed DB, worldwide airline reservation, banking system
Information sharing among distributed users
CSCW or groupware
Resource sharing
Sharing DB/expensive hardware and controlling remote lab.
devices
Better cost-performance ratio / Performance
Emergence of Gbit network and high-speed/cheap CPUs
Sharing expensive resources.
11
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
Reasons/ Advantages for Distributed
12
Computing Systems
Shorter response time & higher throughput
Parallel processing, load distribution, partitioning
computational work
Higher Reliability
Is degree of tolerance against errors and component
failure
Non-stopping (availability)
Scalability (open distributed systems)
Loosely coupled connection and hot plug-in
Flexibility
Reconfigure the system to meet users’ requirements
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
10 marks
13 Issues OF Distributed System
• Transparency 10 marks
• Reliability
• Flexibility/openness 5 marks
Issues • Performance
• Scalability
• Heterogeneity
• Security
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
14 Transparency (SSI)
It hides the fact that the processes and resources are physically
distributed across multiple computers.
Access transparency
Allows users to access remote resource same as local resource
Location transparency
Name transparency:-resource should be independent of the
physical connectivity
User mobility:- user can freely logon to any m/c to access
resources
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
Issues:-
Naming of replicas
Replication control
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
15 Transparency (SSI) ………Cont
Failure transparency:
deals with masking from the user’s partial failure.
Complete failure transparency is not achievable
Migration transparency
Movement of the object is handled automatically in a user
transparent way.
Issues
Which object?
Name change
Migration of process
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
16 Transparency (SSI) ………Cont
Concurrency transparency
Each user has a feeling that he/she is the sole user of the
system
Properties:-
Event ordering
Mutual exclusion
No- starvation
No deadlock
Performance transparency:
Load balancing
Scaling transparency:
Expand in scale without disrupting the activities of the users
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
17 Reliability/ Failure handling
(-Is degree of tolerance against errors and component failure)
Detecting failure
Eg. Remote server crashed
Masking failure
Messages can be retransmitted when they fail to arrive
Replicate file data/files
Tolerating failure
Redundancy techniques
K-fail stop failure needs K + 1 replicas (eg. K=2 total no of replicas=3)
K-Byzantine failures needs 2K + 1 replicas.
Distributed control
Avoiding single point of failure eg. Keeping multiple, independent file
servers
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
18 Reliability/ Failure handling
(-Is degree of tolerance against errors and component failure)
Recovery from failure
Atomic transaction
Stateless servers
Acknowledgment and timeout-based retransmission of msg
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
5 marks
19 Flexibility/Openness
Whether the system can be extended and
re-implemented in various ways
Defining standard rules:-
That describe syntax and semantic of services.
(Interface Definition Language IDL)
Ease of modification:-
Some part of the design need to be
replaced/modified
Ease of enhancement:-
Adding new functionality to make system powerful
Most influencing factor - Kernel designing
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
5 marks
20 Kernel of OS
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
21 Monolithic Kernel & Microkernel
Features Monolithic kernel Microkernel
File management, device Interprocess communication,
management, process some device management,
management , memory process management ,
Services
management , interprocess memory management
communication, name
management
Structure Large- monolithic Small
Flexibility Not flexible Modular in nature
Adding new Need to stop the system while No need to stop the system
services adding new services while adding new services
--High -Low
-- No message passing & no -message based interprocess
Performance
- context switching communication
- Context switching
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
22
Performance:
Design principals:-
Batch if possible:
Transferring data in large chunks
Piggybacking of acknowledgement
Cache data
Improves overall system performance by saving computing
time and n/w traffic.
Minimize n/w traffic
Migrating a process closer to the resource it is using heavily.
Clustering two or more processes to one node
Take advantage of fine grain parallelism for
multiprocessing
Threads
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
24 Scalability
A system is salable if it will remain effective when there is
significant increase in the number of resources and number
of users
Design challenges :
Preventing s/w resources running out
Over compensating of for future growth may be
worse than adapting to change
Avoiding performance bottleneck
Avoid centralized entities
Avoid centralized algorithms
Perform post operations on client sides
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
25 Heterogeneity
Data and instruction formats depend on each
machine architecture
If a system consists of K different machine types,
we need K–1 translation software for each node.
If we have an architecture-independent standard
data/instruction formats, each different machine
prepares only such a standard translation
software.
Java and Java virtual machine
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
26 Security
Lack of a single point of control
Security concerns:
Message was received by the intended
receiver.
Messages was sent by genuine sender.
Contents of messages are not changed.
Cryptography is the only known
practical mechanism.
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
10 marks
27 Goal in Distributed System
Heterogeneity – can the system handle a large variety of types
of PCs and devices
Robustness – is the system resilient to host crashes and
failures, and to the network dropping messages
Availability – are data+services always there for clients
Transparency – can the system hide its internal workings from
the users
Concurrency – can the server handle multiple clients
simultaneously
Efficiency – is the service fast enough? Does it utilize 100% of
all resources
Scalability – can it handle 100 million nodes without degrading
service? (nodes=clients and/or servers)
Security – can the system withstand hacker attacks
Openness – is the system extensible?
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
10 Marks
28 TYPES OF D.S. :
Distributed Computing Systems.
Cluster computing
Grid Computing
Distributed Information Systems.
Transaction processing system
Enterprise application integration
Distributed Pervasive Systems.
Home system
Health care system
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
DISTRIBUTED COMPUTING
29
SYSTEMS: Cluster Computing
A computer cluster is a group of tightly coupled
computers(similar) that work together closely so that it can be
viewed as a single computer.
Clusters are commonly connected through fast local area
networks.
Clusters have evolved to support applications ranging from e-
commerce, to high performance database applications.
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
30 DISTRIBUTED COMPUTING
SYSTEMS: Cluster Computing
Goal: High performance computing tasks.
Cluster Computing Systems:
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
31 DISTRIBUTED COMPUTING
SYSTEMS: Cluster Computing
Pros:
High availability
Load balancing
Single system image
Cons :
Supports only homogeneous infrastructure
Problem in Finding Fault
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
32 DISTRIBUTED COMPUTING
SYSTEMS: Grid Computing
Allows sharing and coordinated use of diverse resources in
dynamic, distributed “virtual organizations”.
Grid computing is all about achieving greater performance
and throughput by pooling resources on a local, national, or
international level.
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
33 DISTRIBUTED COMPUTING
SYSTEMS: Grid Computing
Grid Computing is a technique in which the idle systems in the
Network and their “ wasted “ CPU cycles can be efficiently used
by uniting pools of servers, storage systems and networks into a
single large virtual system for resource sharing dynamically at
runtime.
These systems can be distributed across the globe; they're
heterogeneous (some PCs, some servers, maybe mainframes and
supercomputers); somewhat autonomous (a Grid can potentially
access resources in different organizations).
Grid computing is form of networking unlike conventional network
that focus on communications among devices.
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
34 DISTRIBUTED COMPUTING
SYSTEMS: Grid Computing ………….working
In general, a grid computing
system requires:
At least one computer,
usually a server, which
handles all the administrative
duties for the System
A network of computers
running special grid
computing network
software.
A collection of computer
software called middleware
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
5 Marks
35 Hardware concept
Hardware in Distributed Systems can be
organized in several different ways:
Multiprocessor system
Multicomputer system
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
36 Multiprocessor system
(Hardware concept)
Memory system consists of one or more
memory modules whose address space is
shared by all the processors
Tightly coupled
loosely coupled
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
37 Tightly Coupled Systems
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
38 Tightly Coupled Systems
Tightly coupled systems usually are
multiprocessor systems
Have a single address space
Usually has a single bus or backplane to which all
processors and memories are connected
Low communication latency
Shared memory for processor communication
Shared I/O device access
Example:
Multiprocessor Windows PC
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
39 Loosely Coupled Systems
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
40 Loosely Coupled Systems
Most distributed systems are “loosely-coupled
Each CPU runs an independent autonomous OS
Hosts communicate through message passing.
Computers/systems don’t really trust each
other
Some resources are shared, but most are not
The system may look differently from
different hosts
Typically, communication times are long
Relative to processing times
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
42 Hardware concept
(Multicomputer system )
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
43 Hardware concept
(Multicomputer system )
m/c with independent processor and
memories are interconnected by the
n/w
Each computer has its own processor
with cache & memory module
It can be homogenous or heterogynous
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
5 Marks
44 Software concept
Task of OS:-
Provide virtual m/c to user, which is easier to program
Mange various resources of the system
Types :-
Distributed Operating Systems
Network Operating System
Middleware operating system
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
45 Software concept
Distributed Operating Systems
Is a tightly couple operating system
OS on each m/c knows about the other computer
OS on different computers generally the same
Services are distributed
Manages:
Multiprocessor
Homogeneous multicomputer
Provide transparency
Location, migration, concurrency, replication,...
Present users with a virtual uniprocessor
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
46 Software Concepts in DS
DOS - Multiprocessor Operating Systems
Like a uniprocessor operating system
Manage multiple processes transparently to
the user
Each processor has its own hardware cache
Maintain consistency of cached data
Communication through shared Memory
The OS must provide mechanisms to protect data
against simultaneous access (Semaphores,
Monitors, etc.)
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
47 Software Concepts in DS
DOS - Multicomputer Operating Systems
Each computer has its own Kernel to manage local
resources
Communication through
message passing,
Distributed shared memory (virtual shared memory)
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
51 Software Concepts in DS
Network Operating System
OS can be different (Windows or Linux)
Typical services: rlogin, rcp
Fairly primitive way to share files
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
53 Network Operating System
Some characteristics:
• Each computer has its own operating system
with networking facilities
• Computers work independently (i.e., they
may even have different operating systems)
• Services are tied to individual nodes (ftp,
telnet,WWW)
• Highly file oriented (basically, processors
share only files)
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
54 Network Operating System
Pros:
Minimal OS kernel
Easy to add new machines to the system
(usually all is needed is to connect the
machine and make it known to the network)
Cons:
Lack transparency
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
55 Middleware Based Systems
A software layer placed between the application/user
layer and the operating system layer. Allows users and
applications to “ignore” the differences in lower layers
(OS, hardware, etc.)
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
56 Middleware Based Systems
Some characteristics:
• OS on each computer need not know about the other
computers
• OS on different computers need not generally be the
same
• Support heterogeneity: multiple language and different OS
• Use common set of services for local applications an
independent set of services for remote application
• Introduce transparency
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
57
Comparison between Systems 5 Marks
Distributed OS
Network Middleware-
Item
OS based OS
Multiproc. Multicomp.
Degree of
Very High High Low High
transparency
Same OS on all nodes Yes Yes No No
Number of copies of
1 N N N
OS
Basis for Shared Model
Messages Files
communication memory specific
Resource Global, Global,
Per node Per node
management central distributed
Scalability No Moderately Yes Varies
Openness Closed Closed Open Open
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
58 Models of Middleware
Remote Procedure Call (RPC)
Message-Oriented Middleware (MOM)
Object Request Broker (ORB)
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
59 Remote Procedure Call (RPC)
Masks remote function calls as being local
Client/server model
Request/reply paradigm usually implemented with
message passing in RPC service
Marshalling of function parameters and return value
Stubs
Client Server
Process Process
.
.
.
sum(i, j)
message message
n = sum(4, 7); int i, j;
sum sum
. {
. 4 4
. return (i+j);
7 7 }
OS OS
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
60
MOM – Message Oriented
Middleware
Asynchronous operation (caller sends a message and continue
its work, „fire and forget“).
Store and Forward communication.
Sender & receiver are loosely coupled:
They do not need to be active at the same time.
The sender does not need to know the receiver location and vice versa.
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
61
Object-Oriented Middleware
(OOM)
Objects can be local or remote
Object references can be local or remote
Remote objects have visible remote interfaces
Technologies:
RMI
CORBA (The Common Object Request Broker)
local OOM OOM remote
object object
object A skeleton
request request
broker broker object B
/ /
object object
proxy manager manager
object B object B
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
62 Properties of OOM
Support for object-oriented programming model
objects, methods, interfaces, encapsulation, …
exceptions (were also in some RPC systems e.g.
Mayflower)
Synchronous request/reply interaction
same as RPC
Location Transparency
system (ORB) maps object references to locations
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
69 Services of Middleware system
Naming service
Locate the object or interface by using their names
Persistence service
Store the distributed objects permanently on the data store
Message service
Send and receive messages(use request /response primitives)
Querying service
Query on distributed objects
Concurrency service
Share and access resource concurrently
Security service
Provide security to shared resources
Kanchan K. Doke, Computer Engg. Dept. ,BVCOE
70