Distributed Systems
By- Sumita Das
Topics Covered
 Introduction to Distributed systems
 Examples
 Advantages over Personal Systems
 Advantages over Centralized Systems
 Disadvantages
 Design Issues
 Communication in Distributed Systems
2Created by Sumita Das
Distributed System
3Created by Sumita Das
Definition
 Collection of independent computers that
appears to users of the system as a single
computer.
 Each computer consists:
•Memory
•CPU
 Allow many user to work together.
4Created by Sumita Das
Examples of distributed systems
 Web search
–Index the entire contents of the Web.
 Massively multiplayer online games
–Very large number of users sharing a virtual world.
 Financial trading
–Real time access and processing of a wide range of
information sources
 Social Networking (Facebook)
5Created by Sumita Das
Advantages over Personal Systems
1. Data sharing : Many users access same
database.
2. Device sharing: Allow many users to share
peripherals.
3. Communication: Make human-to-human
communication easier.
4. Flexibility: Spread workload over available
machines. 6Created by Sumita Das
Advantages over Centralized
systems
1. Speed: Has more total computing power
than mainframe.
2. Reliability: If one machine crashes, the
system as a whole can still survive.
3. Incremental growth: Computing power
can be added
7Created by Sumita Das
Advantages over Centralized
systems
4. Economics: Offer better price and
performance than mainframes.
5. Inherent distribution: Some machines
involve spatially separated machines
8Created by Sumita Das
Disadvantages of Distributed
System
1. Software: Little software exists at present
2. Networking: Network can saturate or cause
other problems
3. Security: Easy access also applies to secret
data
4. Privacy: Data may be accessed securely but
without the owner’s consent 9Created by Sumita Das
Design Issues
 Making Resources Accessible
 Transparency
 Flexibility
 Reliability
 Performance
 Scalability
10Created by Sumita Das
Communication in Distributed
Systems
Uniprocessor
Systems
Distributed
Systems
Inter Process
Communication
Shared
Memory
Message
Passing
Remote
Procedure Call
Message Passing Model
Communication Primitives :
•SEND
•Message
•Destination
•RECEIVE
•Source of message
•Buffer for storing message
Message Passing Model
Blocking
Primitives
Non-Blocking
Primitives
•The user buffer can
be reused as soon as
the control is
returned to the user
program.
•Returns control to the
caller immediately
before message is sent
to the user.
 Disadvantage: Sender can’t modify the message
buffer until the message has been sent.
Non-Blocking Primitives
Non-Blocking Primitives
Buffered Option Unbuffered Option
14Created by Sumita Das
Buffered Option
Messages are copied three times
1. User buffer to the kernel buffer
2. Kernel buffer on the sending computer to the
kernel buffer on the receiving computer
3. Buffer on the receiving computer to a user
buffer.
15Created by Sumita Das
 Data is copied from one user buffer to
another user buffer directly.
 SEND : It should avoid reusing the user
buffer until the message has been
transmitted.
 RECEIVE : If a message is present, the
consumer process reads it, otherwise it
performs some other computation.
Unbuffered Option
16Created by Sumita Das
Message Passing Model
Reliable
Primitives
Unreliable
Primitives
Unreliable SEND : It does not return control to the user
program until the message has been sent.
Reliable SEND : It does not return control to the user
program until an acknowledgment has been received.
17Created by Sumita Das
RECEIVE : does not return control until a
message is copied to the user buffer.
 Reliable RECEIVE automatically sends an
acknowledgment.
 Unreliable RECEIVE does not send an
acknowledgment.
Message Passing Model
18Created by Sumita Das
References
• Andrew S.Tanenbaum, Maarten Van Steen,
“DISTRIBUTED SYSTEMS: Principles and
Paradigms, Second Edition
Created by Sumita Das 19

Distributed systems1

  • 1.
  • 2.
    Topics Covered  Introductionto Distributed systems  Examples  Advantages over Personal Systems  Advantages over Centralized Systems  Disadvantages  Design Issues  Communication in Distributed Systems 2Created by Sumita Das
  • 3.
  • 4.
    Definition  Collection ofindependent computers that appears to users of the system as a single computer.  Each computer consists: •Memory •CPU  Allow many user to work together. 4Created by Sumita Das
  • 5.
    Examples of distributedsystems  Web search –Index the entire contents of the Web.  Massively multiplayer online games –Very large number of users sharing a virtual world.  Financial trading –Real time access and processing of a wide range of information sources  Social Networking (Facebook) 5Created by Sumita Das
  • 6.
    Advantages over PersonalSystems 1. Data sharing : Many users access same database. 2. Device sharing: Allow many users to share peripherals. 3. Communication: Make human-to-human communication easier. 4. Flexibility: Spread workload over available machines. 6Created by Sumita Das
  • 7.
    Advantages over Centralized systems 1.Speed: Has more total computing power than mainframe. 2. Reliability: If one machine crashes, the system as a whole can still survive. 3. Incremental growth: Computing power can be added 7Created by Sumita Das
  • 8.
    Advantages over Centralized systems 4.Economics: Offer better price and performance than mainframes. 5. Inherent distribution: Some machines involve spatially separated machines 8Created by Sumita Das
  • 9.
    Disadvantages of Distributed System 1.Software: Little software exists at present 2. Networking: Network can saturate or cause other problems 3. Security: Easy access also applies to secret data 4. Privacy: Data may be accessed securely but without the owner’s consent 9Created by Sumita Das
  • 10.
    Design Issues  MakingResources Accessible  Transparency  Flexibility  Reliability  Performance  Scalability 10Created by Sumita Das
  • 11.
    Communication in Distributed Systems Uniprocessor Systems Distributed Systems InterProcess Communication Shared Memory Message Passing Remote Procedure Call
  • 12.
    Message Passing Model CommunicationPrimitives : •SEND •Message •Destination •RECEIVE •Source of message •Buffer for storing message
  • 13.
    Message Passing Model Blocking Primitives Non-Blocking Primitives •Theuser buffer can be reused as soon as the control is returned to the user program. •Returns control to the caller immediately before message is sent to the user.
  • 14.
     Disadvantage: Sendercan’t modify the message buffer until the message has been sent. Non-Blocking Primitives Non-Blocking Primitives Buffered Option Unbuffered Option 14Created by Sumita Das
  • 15.
    Buffered Option Messages arecopied three times 1. User buffer to the kernel buffer 2. Kernel buffer on the sending computer to the kernel buffer on the receiving computer 3. Buffer on the receiving computer to a user buffer. 15Created by Sumita Das
  • 16.
     Data iscopied from one user buffer to another user buffer directly.  SEND : It should avoid reusing the user buffer until the message has been transmitted.  RECEIVE : If a message is present, the consumer process reads it, otherwise it performs some other computation. Unbuffered Option 16Created by Sumita Das
  • 17.
    Message Passing Model Reliable Primitives Unreliable Primitives UnreliableSEND : It does not return control to the user program until the message has been sent. Reliable SEND : It does not return control to the user program until an acknowledgment has been received. 17Created by Sumita Das
  • 18.
    RECEIVE : doesnot return control until a message is copied to the user buffer.  Reliable RECEIVE automatically sends an acknowledgment.  Unreliable RECEIVE does not send an acknowledgment. Message Passing Model 18Created by Sumita Das
  • 19.
    References • Andrew S.Tanenbaum,Maarten Van Steen, “DISTRIBUTED SYSTEMS: Principles and Paradigms, Second Edition Created by Sumita Das 19