0% found this document useful (0 votes)
7 views74 pages

Introduction to Distributed System

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)
7 views74 pages

Introduction to Distributed System

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/ 74

Distributed Operating

System – ITT458-02

Unit-1
Introduction to
Distributed Systems
Syllabus

Unit No. Unit Name % Weightage


1 Introduction to distributed Systems 1 Question
2 Distributed Mutual Exclusion 1 Question
3 Distributed Deadlock Detection 1 Question
4 Distributed File System 1 Question
5 Distributed Scheduling Issues 1 Question
6 Recovery 1 Question
• Introduction
Topics to be covered
• Operating System
• Basic Concepts of Distributed Operating System
• Definition and Goal
• Advantage
• Hardware and Software Concepts
• Design Issues
What is Operating System?
• An operating system (OS) is system software that
manages computer hardware and software
resources and provides common services for
computer programs.
• Example:
What is Operating System?
• It is a program that acts as an interface between
the user and the computer hardware and controls
the execution of all kinds of programs.
User
User 1 User 2 User 3

Software
System Software Application Software

Operating System
Windows Linux Mac

Hardware
CPU RAM I/O
OS Example
Regular OS

 When you want to do your own thing without interacting with


others.
 Simple (No rules to follow).
Evolution of Modern OS
• First Generation OS
– System:
• Centralized OS
– Characteristics:
• Process Management
• Memory Management
• I/O Management
• File Management
– Goals:
• Resource Management
Centralized OS
Memory
T1 P1 F1

P2
F2
P3

T2 P4 D2 D3
D1

Management of processes, P1, P2, P3, P4


T3 Management of memory, Memory
Management of disks, D1, D2, D3
Centralized OS Management of files, F1, F2
Management of terminals, T1, T2, T3
Evolution of Modern OS
• Second Generation OS
– System:
• Network OS(NOS)
– Characteristics:
• Remote access
• Information exchange
• Network browsing
– Goals:
• Interoperability-Sharing of resources between the systems.
Network Operating System
File Server

Client-1 Client-2

Request

Reply

Network
NOS Example

 When you want to interact with others.


 Introduces Network.
 Hard compared to regular OS (have to follow rules E.g., traffic
rules).
NOS Example
Printer connected to a computer Print
Printer
Server
Print

× Print

Client-1 Client-2 Client-3 Client-4


Evolution of Modern OS
• Third Generation OS
– System:
• Distributed OS(DOS)
– Characteristics:
• Global View of Computational power, file system, name
space, etc.
– Goals:
• Single computer view of multiple heterogeneous computer
systems.
Distributed Operating System
 “A Distributed system is collection of independent computers
which are connected through network.”
Systems processors
are differ in size and
functions

Communication
Network
Distributed Operating System
Definition by Coulouris, Dollimore, Kindberg and Blair
• “A distributed system is defined as one in which
components at networked computers communicate and
coordinate their actions only by passing messages.”
• “A Distributed system is collection of independent
computers which are connected through network.”
Distributed Operating System
• A great example of distributed system is the web page of
Amazon .
www.amazon.in
User Internet

Web Server

Fashion Mobile Store


Store
Scenario-1:
Want to process Increase RAM
RAM: 4GB RAM: 8GB
500GB Data size to 8GB

Vertical Scaling
Scenario-2:
Want to process
RAM: 4GB
500GB Data

Add more
Processors/Systems
DOS

RAM: 4GB RAM: 4GB RAM: 4GB

Divide/Distribute the workload

Horizontal Scaling
Examples of Distributed Systems
• From the definition, Distributed Systems also looks the
same as single system.
• Let us say about Google Web Server, from users
perspective while they submit the searched query, they
assume google web server as a single system.
• Just visit google.com, then search.
• However, under the hood Google builds a lot of servers
even distributes in different geographical area to give
you a search result within few seconds.
• So the Distributed Systems does not make any sense for
normal users.
Examples of Distributed Systems
• Web Search Engines:
– Major growth industry in the last decade.
– 10 billion per month for global number of searches.
– e.g. Google distributed infrastructure
Examples of Distributed Systems
 Massively multiplayer online games:
• Large number of people interact through the Internet with a
virtual world.
• Challenges include fast response time, real-time propagation of
events.
The Top 20 Valuable Facebook Statistics
(Zephoria, Updated Dec., 2017)
Why Distributed Operating System?
• Facebook, currently, has 1.5 billion active monthly users.
• Google performs at least 1 trillion searches per year.
• About 48 hours of video is uploaded in Youtube every minute.
• A single system would be unable to handle the processing. Thus,
comes the need for Distributed Systems.
• The main answer is to cope with the extremely higher demand
of users in both processing power and data storage.
• With this extremely demand, single system could not achieve it.
• There are many reasons that make distributed systems is viable
such as high availability, scalability, resistant to failure, etc.
Why Distributed Operating System?
• It is Challenging/Interesting.
• Partial Failures
– Network
– Node failures
• Concurrency
– Nodes execute in parallel. Parallel Computing
– Messages travel asynchronously.
Network OS vs Distributed OS
Network Operating System Distributed Operating System
A network operating system is A distributed operating system is
made up of software and an ordinary centralized operating
associated protocols that allow a system but runs on multiple
set of computer network to be independent CPUs.
used together.

Environment users are aware of Environment users are not aware


multiplicity of machines. of multiplicity of machines.

Control over file placement is It can be done automatically by


done manually by the user. the system itself.

No implicit sharing of loads. Sharing of loads between


nodes(load balancing).
Network OS vs Distributed OS
Network Operating System Distributed Operating System

Performance is badly affected if It is more reliable or fault tolerant


certain part of the hardware i.e. distributed operating system
starts malfunctioning. performs even if certain part of
the hardware starts
malfunctioning.

Remote resources are accessed Users access remote resources in


by either logging into the desired the same manner as they access
remote machine or transferring local resources.
data from the remote machine to
user's own machines.
Distributed Operating System
Architecture

• A distributed system organized as Middleware.


• The middleware layer runs on all machines, and offers a uniform
interface to the system.
Middleware (MW)
• Software that manages and supports the different
components of a distributed system. In essence,
it sits in the middle of the system.
• It enables multiple systems to communicate with
each other across different platforms.
• Examples:
– Transaction processing monitors
– Data converters
– Communication controllers
Role of Middleware (MW)
• In some early systems:
– Middleware tried to provide the illusion that a collection of
separate machines was a single computer.
• Today:
– Clustering software allows independent computers to work
together closely.
– Middleware also supports seamless access to remote services,
doesn’t try to look like a general-purpose OS.
Role of Middleware (MW)
 Other Middleware Examples
– CORBA (Common Object Request Broker Architecture)
– DCOM (Distributed Component Object Management) – being
replaced by .NET
– Sun’s ONC RPC (Remote Procedure Call)
– RMI (Remote Method Invocation)
– SOAP (Simple Object Access Protocol)
Distributed System Goals
The following are the main goals of distributed systems:
• The relative simplicity of the software - Each processor
has a dedicated function.
• Incremental growth - If we need 10 percent more
computing power, we just add 10 percent more
processors.
Distributed System Goals
• Reliability and availability - A few parts of the system can be
down without disturbing people using the other parts.

• Openness: Multiple computers of different types, operating


systems and manufacturers can interact together in a simple
system.
Advantages of Distributed Systems over Centralized Systems
• Economics: A collection of microprocessors offer a better
price/performance than mainframes. It is an cost
effective way to increase computing power.

• Speed: A distributed system may have more total


computing power than a mainframe.
Advantages of Distributed Systems over Centralized
Systems
• Inherent distribution: Some applications are inherently
distributed. Ex. a supermarket chain, Banking, Airline
reservation.
• Reliability: If one machine crashes, the system as a whole
can still survive. Higher availability and improved reliability.
• Ex. control of nuclear reactors or aircraft.

× Load Transfer
Advantages of Distributed Systems over Independent
PCs
• Data sharing: Allow many users to access to a common database.
• Resource Sharing: Expensive peripherals such as color laser
printers, photo-type setters and massive archival storage devices
are also among the few things that should be sharable.

• Communication: Enhance human-to-human communication, e.g.,


email, chat.
• Flexibility: Spread the workload over the available machines
Disadvantages of Distributed Systems over Centralized System

• Software:
– Would be complex.
• Network problem:
– Network saturation.
– Malfunctioning of network.
• Security:
– Possibility of security violation since the private data are
visible to others over the network.
Classification of Distributed System

Based on Hardware

Based on number
of instructions and
DataStream
Classification based on Hardware
• Even though all distributed system consist of multiple CPUs, there
are several different ways the hardware can be organized, specially
in terms of how they are interconnected and communicate.

Parallel & Distributed


Computers

Tightly Coupled Loosely Coupled

Multiprocessor Multicomputer
(Shared Memory) (Private Memory)

Bus based Switched Bus based Switched


Tightly-Coupled OS(Shared Memory)
 Shared Memory Machine: The n processors shares physical
address space. Communication can be done through shared
memory.

P P P P

Interconnect (Bus Line)

Shared Memory
Tightly-Coupled OS(Shared Memory)
 Shared Memory Machine: The n processors shares physical
address space. Communication can be done through shared
memory.
A=10+10
A=A+10
A=20 Read
A=20A

P P P P

Interconnect (Bus Line)

A=10
A=20
10
Unit 1: Introduction to DOS 40 Darshan Institute of Engineering & Technology
Loosely-Coupled OS(Private Memory)
 Private Memory Machine: Each processors has its own local
memory. Communication can be done through Message passing.

M M M M

P P P P

Interconnect (Bus Line)


Loosely-Coupled OS(Private Memory)
 Private Memory Machine: Each processors has its own local
memory. Communication can be done through Message passing.

M M M M

A=10A
Read P P P P A=20A
Read

Read
A=20A

Interconnect (Bus Line)


Classification based on Hardware
Loosely-Coupled OS Tightly-Coupled OS
Each processors has its own local The n processors shares physical
memory. address space.
Communication can be done Communication can be done
through Message passing. through shared memory.

Manages heterogeneous Manages multiprocessors &


multicomputer Distributed homogeneous multicomputer.
Systems.

Similar to “local access feel” as a Provides local services to remote


non-distributed, standalone OS. clients via remote logging
Classification based on Hardware
Loosely-Coupled OS Tightly-Coupled OS

Data migration or computation Data transfer from remote OS to


migration modes (entire process local OS via FTP (File Transfer
or threads) Protocols)

Distributed Operating System Network Operating System (NOS)


(DOS)
Classification based on Instruction &
DataStream
• According to Flynn’s classification can be done based on
the number of instruction streams and number of data
streams.
Flynn’s
Classification

SISD SIMD MISD MIMD


Classification based on Instruction & DataStream
 Single instruction stream single data stream (SISD)
• One Program counter and one path to data memory.
• A computer is capable of executing one instruction at a time
operating on one piece of data.
• An ordinary (Sequential) computer.

Instruction Pool +
Data Stream

A B
PU

Unit 1: Introduction to DOS 46 Darshan Institute of Engineering & Technology


Classification based on Instruction & DataStream
• Single instruction stream, multiple data streams
(SIMD)
– One Program counter and multiple paths to data memory.
– A computer is capable of executing one instruction at a time,
but operating on different pieces of data.
Instruction Pool +

A B +
PU
Data Stream

C D +
PU

E F
PU
Classification based on Instruction & DataStream
• Multiple instruction streams, single data stream
(MISD)
– No more computers fit this model.
– Uncommon architecture which is generally used for fault
tolerance.
+ Instruction Pool *

A B A B
Data Stream

PU PU
Classification based on Instruction & DataStream
• Multiple instruction streams, Multiple data
stream (MIMD)
– A group of independent computers, each with its own program counter,
program, and data.
– A computer that can run multiple processes or threads that are cooperating
towards a common objective.
+ Instruction Pool *

A B A +B *
PU PU
Data Stream

C D C D
PU PU
Classification based on Instruction &
DataStream

• All distributed systems are MIMD, We divide all


MIMD computers into two groups:
• Have shared memory, usually called multiprocessors.
• Do not have shared memory, called multicomputer.
Distributed Computing System Models
• Distributed Computing system models can be broadly
classified into five categories.
Minicomputer Model

Workstation Model

Workstation – Server Model

Processor – Pool Model

Hybrid Model
Minicomputer Model

• Extension of Time sharing system


– User must log on his/her home minicomputer.
– Thereafter, he/she can log on a remote machine by telnet.

• Resource sharing
– Database T
Mini-
– High-performance devices
Computer
T
• Example:
– ARPAnet

T T
Mini- Communication Mini-
Computer Network Computer
T T
Workstation Model
• Process migration
– Users first log on his/her personal workstation.
– If there are idle remote workstations, a heavy job may migrate to
one of them.
• Problems:
– What if a user log on the remote machine
– How to find an idle workstation Workstation

– How to migrate a job


Workstation Communication Workstation
Network

Workstation Workstation
Workstation-Server Model

Workstation

Workstation Workstation

Communication
Workstation Workstation
Network

Mini Mini
Computer Mini Computer
Used as a Computer Used as a
File Server Used as a Print Server
database
Server
Workstation-Server Model
• Client workstations
– Diskless
– Graphic/interactive applications processed in local.
– All file, Print, http and even cycle computation requests are sent to servers.
• Server minicomputers
– Each minicomputer is dedicated to one or more different types of services.
• Client-Server model of communication
– RPC (Remote Procedure Call)
– RMI (Remote Method Invocation)
• A Client process calls a server process function.
• No process migration invoked
Processor-Pool Model
Terminals

Terminals Terminals

Communication
Terminals Terminals
Network

Run File
Server ---------- Server

Pool of processors
Processor-Pool Model
• Clients:
• They log in one of terminals (diskless workstations)
• All services are dispatched to servers.
• Servers:
• Necessary number of processors are allocated to each user
from the pool.
• Better utilization of resources.
• Example:
• Web Search Engines
Hybrid Model
• Advantages of the workstation-server and
processor-pool models are combined to build a
hybrid model.
• It is built on the workstation-server model with a
pool of processors.
• Processors in the pool can be allocated dynamically
for large computations, that cannot be handled by
the workstations, and require several computers
running concurrently for efficient execution.
• This model is more expensive to implement than
the hybrid or the processor-pool model.
Issues in Designing a Distributed
System
Transparency Reliability Flexibility

Performance Scalability Heterogeneity

Security
Transparency
• Main goal of Distributed system is to make the existence of
multiple computers invisible (transparent) and provide single
system image to user.
• A transparency is some aspect of the distributed system that is
hidden from the user (programmer, system developer,
application).
• While users hit search in google.com, They never notice that their
query goes through a complex process before google shows them
a result.

Unit 1: Introduction to DOS 60 Darshan Institute of Engineering & Technology


Types of Transparency
• Local and remote objects should be accessed in a
uniform way.
• User should not find any difference in accessing local or
Access remote objects.
Transparency • Hide differences in data representation & resource
access (enables interoperability).
• Example : Navigation in the Web

• Objects are referred by logical names which hide the


physical location of the objects.
• Resource should be independent of the physical
Location connectivity or topology of the system or the current
Transparency location of the resources.
• Hide location of resource (can use resource without
knowing its location).
• Example: Pages in the Web
Types of Transparency

• The provision of create replicas (additional copies) of


files and other resources on different node of the
Replication distributed system.
Transparency • Hide the possibility that multiple copies of the resource
exist (for reliability and/or availability).
• Replica of the files and data are transparent to the user.

• It deals with the masking from the users partial failures


in the system, such as a communication link failure, a
Failure
machine failure, or a storage device crash.
Transparency • Hide failure and recovery of the resource.
• Example: Database Management System.
Types of Transparency
• Resource object is to be moved from one place to
another automatically by the system.
Migration • Hide possibility that a system may change location of
Transparency resource (no effect on access).
• Load balancing is one among many reason for
migration of objects.

• Each user has the feeling that he or she is the sole user
of the system and other user do not exists in the
Concurrency system.
Transparency • Hide the possibility that the resource may be shared
concurrently.
• Example: Automatic teller machine network, DBMS
Types of Transparency
• Resource object is to be moved from one place to
another automatically by the system.
Migration • Hide possibility that a system may change location of
Transparency resource (no effect on access).
• Load balancing is one among many reason for
migration of objects.

• Each user has the feeling that he or she is the sole user
of the system and other user do not exists in the
Concurrency system.
Transparency • Hide the possibility that the resource may be shared
concurrently.
• Example: Automatic teller machine network, DBMS
Types of Transparency
• It allow the system to be automatically reconfigured to
Performance
improve performance, as load vary dynamically in the
Transparency system.

Scaling • It allows the system to expand in scale without


disrupting the activities of the users.
Transparency • Example: World-Wide-Web
Reliability
• Distributed systems are expected to be more
reliable than centralized systems due to the
existence of multiple instances of resources.
• System failure are of two types:
– Fail-stop: The system stop functioning after detecting the
failure.
– Byzantine failure: The system continues to function but gives
wrong results.
• The fault-handling mechanism must be designed
properly to avoid faults, to tolerate faults and to
detect and recover from faults.
Reliability
• Fault avoidance
• Fault tolerance:
– Redundancy technique: To avoid single point of failure.
– Distributed control: To avoid simultaneous functioning of the
servers.
• Fault detection and recovery
– Atomic transaction.
– Stateless server.
– Acknowledgment and timeout-based retransmissions of
messages.
Flexibility
• The design of Distributed operating system should
be flexible due to following reasons:
• Ease of Modification: It should be easy to
incorporate changes in the system in a user
transparent manner or with minimum interruption
caused to the users.
• Ease of Enhancement: New functionality should be
added from time to time to make it more powerful
and easy to use.
• A group of users should be able to add or change
the services as per the comfortability of their use.
Performance
• A performance should be better than or at least
equal to that of running the same application on
a single-processor system.
• Some design principles considered useful for
better performance are as below:
– Batch if possible: Batching often helps in improving
performance.
– Cache whenever possible: Caching of data at clients side
frequently improves over all system performance.
– Minimize copying of data: Data copying overhead involves a
substantial CPU cost of many operations.
– Minimize network traffic: It can be improved by reducing
internode communication costs.
Scalability
• Distributed systems must be scalable as the number of user increases.
A system is said to be scalable if it can handle the addition of
users and resources without suffering a noticeable loss of
performance or increase in administrative complexity.

• Scalability has 3 dimensions:


– Size: Number of users and resources to be processed. Problem
associated is overloading.
– Geography: Distance between users and resources. Problem
associated is communication reliability.
– Administration: As the size of distributed systems increases,
many of the system needs to be controlled. Problem associated
is administrative mess.
Scalability
• Guiding principles for designing scalable
distributed systems:
– Avoid centralized entities.
– Avoid centralized algorithms.
– Perform most operations on client workstations.
Heterogeneity

• This term means the diversity of the distributed


systems in terms of hardware, software, platform,
etc.
• Modern distributed systems will likely span different:
– Hardware devices: computers, tablets, mobile phones, embedded
devices, etc.
– Operating System: Ms Windows, Linux, Mac, Unix, etc.
– Network: Local network, the Internet, wireless network, satellite
links, etc.
– Programming languages: Java, C/C++, Python, PHP, etc.
– Different roles of software developers, designers, system managers.
Security
• System must be protected against destruction and
unauthorized access.
• Enforcement of security in a distributed system has the
following additional requirements as compared to
centralized system:
– Sender of the message should know that message was
received by the intended receiver.
– Receiver of the message should know that the message
was sent by genuine sender.
– Both sender and receiver should be guaranteed that the
content of message were not changed while it is in
transfer.
Brief (Issues in Designing a Distributed
System)
Transparency Provide a single system image to its user.

Reliability Degree of Fault tolerance should be low.

Flexibility Ease of Modification and Enhancement.

Performance Performance should be better than Centralized system.

Scalability Capability of a system to adopt increased service load.

Heterogeneity It consist of dissimilar hardware or software systems.

Must be protected against destruction and unauthorized


Security
access.

You might also like