Docsity

Communication - Distributed Operating Systems - Lecture Slides, Slides of Operating Systems

Partial preview of the text

Download Communication - Distributed Operating Systems - Lecture Slides and more Slides Operating Systems in PDF only on Docsity!

Communication

Message-Oriented Communication

Stream-Oriented Communication

Review

  • In a distributed system, processes
    • run on different machines
    • exchange information through message passing
  • Successful distributed systems depend on communication models that hide or simplify message passing

Types of Communication

  • Persistent versus transient
  • Synchronous versus asynchronous
  • Discrete versus streaming

Persistent versus Transient Communication

  • Persistent : messages are held by the middleware

comm. service until they can be delivered (e.g.,

email)

  • Sender can terminate after executing send
  • Receiver will get message next time it runs
  • Transient : messages exist only while the sender

and receiver are running

  • Communication errors or inactive receiver cause the

message to be discarded

  • Transport-level communication is transient
  • RPC?

Evaluation

  • Fully synchronous primitives may slow processes down, but program behavior is easier to understand
  • In multithreaded processes, blocking is not as big a problem because a special thread can be created to wait for messages

Discrete versus Streaming Communication

  • Discrete : communicating parties exchange discrete messages
  • Streaming : one-way communication; a “session” consists of multiple messages from the sender that are related either by send order (TCP streams), temporal proximity (multimedia streams), etc.

Message Passing Interface (MPI)

  • Designed for parallel applications using transient communication
  • MPI is
    • a standardized and portable message-passing system designed by a group of researchers from academia and industry
    • used in many environments, e.g., clusters
    • platform independent

Message Primitives

  • Asynchronous: e.g. MPI_bsend
  • Synchronous: e.g. MPI_send, MPI_ssend, MPI_sendrecv:

Message-Oriented Middleware (MOM) - Persistent

  • Processes communicate through message queues
    • Queues are maintained by the message-queuing system
    • Sender appends to queue, receiver removes from queue
    • Neither the sender nor receiver needs to be on-line

when the message is transmitted

4.4 Stream-Oriented Communication

  • RPC and message-oriented communication are based on the exchange of discrete messages - Timing might affect performance, but not correctness
  • In stream-oriented communication the message content (multimedia streams) must be delivered at a certain rate, as well as correctly - e.g., music or video

Data Streams

  • Data stream = sequence of data items
  • Can apply to discrete, as well as continuous media
    • e.g. UNIX pipes or TCP/IP connections which are both byte oriented (discrete) streams
    • Messages are related by send order
  • Audio and video require continuous time-based data streams

Data Streams

  • Asynchronous transmission mode: the order is

important, and data is transmitted one after the

other, no restriction to when data is to be delivered

  • Synchronous transmission mode defines a

maximum end-to-end delay for individual data

packets

  • Isochronous transmission mode has a maximum

and minimum end-to-end delay requirement (jitter

is bounded)

  • Not too slow, but not too fast either