Sunteți pe pagina 1din 49

Distributed Operating System (2160710)

Unit: 2
Communication in Distributed
System
Dipak Ramoliya
 dipak.ramoliya@darshan.ac.in

Computer
Computer Engineering
Engineering Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Unit Outline & Weightage %

• Communication in Distributed System 5%


• Computer Network and Layered protocols
• Message passing and related issues
• Synchronization
• Client Server model & its implementation
• Remote procedure call and implementation issues
• Case Studies: SUN RPC, DEC RPC

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 22
Computer Network
 A computer network or data network is a telecommunications network which
allows computers to exchange data.
 In computer networks, networked computing devices exchange data with each
other using a data link.
 The connections between nodes are established using either cable
media or wireless media.
 The best-known computer network is the Internet.
Wireless

Wired
Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 33
Computer Network in DOS
 A Distributed System is basically a computer network whose nodes have their
own local memory and may also have other hardware and software resources.
 A Distributed System relies on the underlying computer network for the
communication of data and control the information between nodes.
 The performance and Reliability of a Distributed system depends on the
underlying computer network.

Source: https://www.usenix.org

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 44
Classification of Network

LAN

MAN WAN
Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 55
Classification of Network
Basis Of Comparison LAN MAN WAN
Metropolitan Area
Expands to Local Area Network Wide Area Network
Network

A network that connects It covers relatively large It spans large locality &
Meaning a group of computers in a region such as cities, connects countries
small geographical area towns together.

Ownership of Network Private Private or Public Private or Public

Design and Maintenance Easy Difficult Difficult

Propagation Delay Short Moderate Long

Speed High Moderate Low


Microwave, Radio
Equipment Needed Switch, Hub Modem, Router
Transmitters & Receivers
Range(Approx.) 1 to 10 km In 100 km Beyond 100 km
Used for College, School, Hospital Small towns, City Country/Continent

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 66
Wireless Network
 A wireless LAN uses wireless
transmission medium.
 Wireless Network used to
have
• high prices
• low data rates
• occupational safety concerns
• licensing requirements
 Popularity of wireless LANs
has grown rapidly.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 77
Layered Protocols -OSI Model
 OSI is “ Open Systems Interconnection".
 OSI model was first introduced in 1984 by the International Organization for
Standardization (ISO).
 It outlines WHAT needs to be done to send data from one computer to another,
Not HOW it should be done.
 A layered protocol architecture provides a conceptual framework for dividing
the complex task into simpler tasks of exchanging information between remote
hosts.
 Each protocol layer has a narrowly defined responsibility.
 A protocol layer provides a standard interface to the next higher protocol layer.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 88
OSI Model
Application to Application
APPLICATION APPLICATION

YER
R L A
Application to Application

E
PRESENTATION PRESENTATION

G H
SESSION HI Application to Application
SESSION

TRANSPORT TRANSPORT

MIDDLE
Process to Process

NETWORK
LAYER
Source to Destination
Router
NETWORK
Source to Destination

Hop to Hop

ER
DATA LINK DATA LINK

Y
Switch

R L A
Hop to Hop

PHYSICAL
LOWE Hub and Repeater
PHYSICAL
Physical Medium

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 99
OSI Model (Layers & Activities)
OSI Layers Activities

Application To allow access to network resources

Presentation To Translate, encrypt, and compress data

Session To establish, manage, and terminate session

To Provide reliable process-to-process


Transport Message delivery and error recovery
To move packets from source to
Network destination; to provide internetworking
To organize bits into frames; to provide
Data Link hop-to-hop delivery
To Transmit bits over a medium; to provide
Physical Mechanical and electrical specifications
Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 10
10
TCP/IP Reference Model

• Protocol
Simple
••Protocol
User Network
Datagram Management Protocol
Protocol
•• Transmission Control
Hypertext Transfer • Simple Mail Transfer
File Transfer Protocol
• Protocol
The name stands for “teletype network”
• • Collecting
Connectionlessinformation from, and configuring network
•• Connection oriented
Browser and web server • communication
• Transfer Send and Receive
Computer
• mail
files login
Remote messages
between a client and server
protocol
• devices,
• Sending
Connection established suchwithout
beforedata
sendingas data
servers,
establishinghubs,
printers, switches
connection
Layer Protocols

Application HTTP TELNET FTP SMTP SNMP

Transport TCP UDP

Internet IP ICMP

Network Access
ETHERNET PACKET RADIO
(Host-to-network)

• Internet Protocol • Internet Control Message Protocol


• Protocol
• Network protocol that controls how of broadcasting that
• A set of rules governing
• Usedthebyformat
network data
of sentlike
devices, over the to send error
routers,
transmitted over a LANmakes use of radio signals carrying
data isnetwork.
Internet or other messages and operational information
packets of data.
Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 11
11
ATM Reference Model
 ATM is “Asynchronous Transfer Mode”
 It is often described as a future computer networking technology.
 ATM is a connection-oriented, high-speed, low-delay switching
and transmission technology that uses short and fixed-size
packets(called cells) to transport information.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 12
12
ATM Reference Model
Management plane

Plane management
Control plane User plane

Layer management
Higher layers Higher layers

ATM adaptation layer • The lowest layer in the ATM protocol.


• It describes the physical transmission
media.
• It converts the submitted • It
We performs
can use all functions
shielded andrelating to
unshielded
information into streams of ATM layer the routing
twisted pair,and multiplexing
coaxial offiber-
cable, and cells
48-octet segments and over
opticVirtual
cable. Channels.
transports these in the • It generates a header to the segment
payload field of multiple Physical layer streams generated by the ATM
ATM cells. Adaptation Layer(AAL).

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 13
13
Main Features of ATM Technology
 International standard-based technology (for interoperability)
 Low network latency (for voice, video, and real-time applications)
 Low variance of delay (for voice and video transmission)
 Guaranteed quality of service
 High capacity switching (multi-giga bits per second)
 Bandwidth flexibility (dynamically assigned to users)
 Scalability (capacity may be increased on demand)
 Medium not shared for ATM LAN (no degradation in performance as
traffic load or number of users increases)
 Supports a wide range of user access speeds
 Supports audio, video, imagery, and data traffic (for integrated services)

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 14
14
Message Passing System
• Message is a block of Information.
• Message passing is a basic form of Inter process communication used in
distributed systems.
• In which, processes or objects can send and receive messages to other
processes.
• It provides a set of message-based IPC protocols and multiple heterogeneous
platforms for programmers.

Send

P1 P2
Receive

The message passing approach

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 15
15
Desirable Features of a Good Message Passing system
 Simplicity : A message passing system should be simple and easy to use. It
should be possible to communicate with old and new applications, with
different modules without the need to worry about the system and network
aspects.
 Uniform Semantics : Semantics of Remote communication should be as close
as possible to those of local communications.
 Efficiency : Less number of message exchanges, as far as practicable, during
the communication process.
 Reliability : Reliable IPC protocol can cope with failure problem and guarantees
the delivery of messages.
 Correctness : Required for Group Communication. (Every message send to
group should be delivered to either all of them or none of them).

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 16
16
Desirable Features of a Good Message Passing system
 Flexibility : It must have flexibility to permit any kind of control flow between
the cooperating processes, including synchronous and asynchronous
send/receive.
 Security : Capable of providing a secure end-to-end communication. It includes
as follows:
• Authentication of the receiver(s) of message by the sender.
• Authentication of the sender of a message by its receiver(s).
• Encryption of a message before sending it over the network.
 Portability : It should be possible to easily construct a new IPC facility on
another system by reusing the basic design of the existing message passing
system.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 17
17
Issues in IPC by Message Passing
 In the design of IPC protocol for a message passing system, the
following important issues need to be considered:
• Who is the sender?
• Who is the receiver?
• Is there one receiver or many receivers?
• Is the message guaranteed to have been accepted by its receiver(s)?
• Does the sender need to wait for reply?
• What should be done if the catastrophic event such as a node crash or a
communication link failure occurs during the course of communication?
• What should be done if the receiver is not ready to accept the message: will
the message be discarded or stored in buffer?
• If there are several outstanding messages for a receiver, can it choose the
order in which to service the outstanding messages.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 18
18
Typical message structure

 A message is a block of information formatted by a sending


process in such a manner that it is meaningful to the receiving
process.
 It consists of a fixed-length header and a variable-size collection of
typed data objects.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 19
19
Typical message structure (conti..)
The header usually consists of the following elements:
 Address:
• It contains characters that uniquely identify the sending and receiving
processes in the network.
 Sequence number.
• This is the message identifier (ID), which is very useful for identifying lost
messages and duplicate messages in case of system failures.
 Structural information.
• This element also has two parts.
• The type part specifies whether the data to be passed on to the receiver is
included within the message or the message only contains a pointer to the
data, which is stored somewhere outside the contiguous portion of the
message.
• The second part of this element specifies the length of the variable-size
message data

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 20
20
Buffering in standard message passing model
 In the standard message passing model, messages can be copied
many times:
• From the user buffer to the kernel buffer (the output buffer of a channel)
• From the kernel buffer of the sending computer (process) to the kernel
buffer in the receiving computer (the input buffer of a channel)
• From the kernel buffer of the receiving computer (process) to a user buffer
 Buffering types
• Null Buffer (No Buffering)
• Single-Message Buffer
• Finite-Bound Buffer
• Unbounded-Capacity Buffer

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 21
21
Null Buffer (No Buffering)
 In this case, there is no place to temporarily store the message.
 Hence one of the following implementation strategies may be
used:
o The message remains in the sender process’s address space
o The message is simply discarded
o The sender may have to try several times before succeeding

Sending Process Receiving Process

message

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 22
22
Single-Message Buffer
 A buffer having a capacity to store a single message is used on the
receiver’s node.
 This strategy is usually used for synchronous communication.
 An application module may have at most one message
outstanding at a time.

Sending Process Receiving Process

message

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 23
23
Finite-Bound Buffer (Multi buffer)
 In this case message is first copied from the sending process’s
memory into the receiving process’s mailbox and then copied
from the mailbox to the receiver’s memory when the receiver calls
for the message.
 When the buffer has finite bounds, a strategy is also needed for
handling the problem of a possible buffer overflow.

Sending Process Receiving Process

message 1

message message 2
message
message n

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 24
24
Finite-Bound Buffer (Multi buffer) Cont…
 The buffer overflow problem can be dealt with in one of the
following two ways:
 Unsuccessful communication
• In this method, message transfers simply fail, whenever there is no more
buffer space and an error is returned.
 Flow-controlled communication
• Flow control, which means that the sender is blocked until the receiver
accepts some messages, thus creating space in the buffer for new
messages.
• synchronization between the sender and the receiver and may result in
unexpected deadlocks.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 25
25
Unbounded-Capacity Buffer
 In the asynchronous mode of communication, since a sender does
not wait for the receiver to be ready.
 There may be several pending messages that have not yet been
accepted by the receiver.
 Therefore, an unbounded-capacity message-buffer that can store
all unreceived messages is needed to support asynchronous
communication with the assurance that all the messages sent to
the receiver will be delivered.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 26
26
Synchronization in Message Passing
 The central issue in the communication structure is the
synchronization.
 The semantics used for synchronization is classified as blocking
and nonblocking types.
 A primitive is said to have nonblocking semantics if its invocation
does not block the execution of its invoker: otherwise a primitive
is said to be blocking type.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 27
27
Synchronization in Message Passing
Senders Receivers
 Blocking send primitive: execution
execution
Sending process blocked until it Receive(Message)
receives acknowledgement. Execution suspended
 Nonblocking send primitive: Send(Message)
Sending process is allowed to Execution suspended
proceed with its execution. Message
 Blocking Receive primitive: Execution
resumed
Receiving process blocked until
it receives a message. Acknowledgement Send
 Nonblocking Receive Execution
resumed
primitive: Receiving process is
allowed to proceed with its
execution after execution of Executing State
the receive statement. Blocked State

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 28
28
Failure in IPC
 Loss of Request Message:
client server
Request
Send request message

Lost

 Loss of Response message:


client server
Request
message
Successfully
Request Execution

Response Send Response

Lost
Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 29
29
Failure in IPC
 Receiver’s computer crash:
client server
Request
Send request message

Unsuccessfully
Crash Request Execution

Restarted

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 30
30
Failure Handling in IPC
client Request server
Send request message Retransmit
Time out
Request Message
Send request Lost
Unsuccessfully
Time out Request Execution
Crash
Send request Restarted Retransmit
Request Message

Time out Response Successful


Request Execution
Lost Retransmit
Send request Request Message
Successful
Response Request Execution

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 31
31
Four-message reliable IPC protocol
 The client sends a request message
Client Server
to the server.
 When the request message is
Request
received at the server’s machine,
the kernel of that machine returns
an acknowledgment message to the Acknowledgment
kernel of the client machine.
 When the server finishes processing
the client’s request it returns a reply Reply
message (containing the result of
processing) to the client.
 When the reply is received at client Acknowledgement
machine, the kernel of that machine
returns an acknowledgment
message to the kernel of the server Executing State
machine. Blocked State

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 32
32
Three-message reliable IPC protocol
 The client sends a request message to Client Server
the server.
 When the server finishes processing Request
the client’s request, it returns a reply
message (containing the result of
processing) to the client. The client
remains blocked until the reply is
received. Reply
 When the reply message is received at
the client’s machine, the kernel of that
machine returns an acknowledgment
Acknowledgement
message.

Executing State
Blocked State

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 33
33
Problem of Three-message IPC protocol
• A problem occurs if a request processing takes a long time.
• If the request message is lost, it will be retransmitted only after the
timeout period, which has been set to a large value to avoid
unnecessary retransmission of the request message.
• If the timeout value is not set properly taking into consideration the
long time needed for request processing, unnecessary retransmissions
of the request message will take place.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 34
34
Overcome Techniques for problems of Three-message IPC protocol

Client Server Client Server


Request Request

Reply Time Request


out
Acknowledgment
Acknowledgment

Client Server
Request

Reply
Time out
Reply
Executing State
Blocked State Acknowledgment

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 35
35
Two-message reliable IPC protocol
 The client sends a request message Client Server
to the server and remains blocked
until a reply is received from the Request
server.
 When the server finishes processing
the client’s request, it returns a
reply message (containing the
Reply
result of processing) to the client.
 If the reply is not received within
the timeout period, the kernel of
the client machine retransmits the
request message.
Executing State
Blocked State

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 36
36
Client Server Model
• Clients: Request servers for the completion of a task.
 Generally called desktop PCs or workstations.
• Servers: Receive requests from the clients and process them.
 After the processing is complete, the servers send a reply to the clients
who sent the request.

Client Server
Network

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 37
37
Client Server Model
 A machine can run as single/multiple clients or single/multiple
servers, or a mix of both.
 This model uses the connectionless Request Reply protocol thus
reducing the overhead of the connection oriented TCP/IP or OSI
protocol.
Request 7
6
Client Server Request/reply
5
Reply 4
Kernel Kernel 3
2 Data Link
1 Physical

Network

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 38
38
Client Server Model
 The Request Reply protocol works as follows:
• The client requesting the service sends a request message to the server.
• The server completes the task and returns the result indicating that it has
performed
 The physical and the data link layer are responsible for transferring packets
between the client and the server through hardware
 The Request Reply protocol defines the set of request and replies to the
corresponding requests.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 39
39
Client Server Model
 Following are different types of packets transmitted across the
network
• REQ: Request packet is used to send the request from the client to the
server.
• Reply: This message is used to carry the result from the server to the client.
• ACK: Acknowledgement packet is used to send the correct receipt of the
packet to the sender.
• Are You Alive (AYA)? This packet is sent in case the server takes a long time
to complete the client's request.
• I am Alive (IAA): The server, if active, replies with this packet.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 40
40
Client Server Model Interaction
 Two processes in client-server
Server Program Client Program
model can interact in various
ways:
• Sockets
• Remote Procedure Calls (RPC) Socket Socket
 Socket
 The process acting as server
opens a socket using a well- Transport Transport
known port and waits until some
Network Network
client request comes.
 The second process acting as a Data link Data link
client also opens a socket but
instead of waiting for an incoming Physical Physical
request, the client processes
‘requests first’.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 41
41
Remote Procedure Call
 Remote Procedure Call (RPC) is a protocol that one program can
use to request a service from a program located in another
computer on a network without having to understand the
network's details.
 A procedure call is also sometimes known as a function call or a
subroutine call.
 RPC uses the client-server model.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 42
42
Remote Procedure Call
 It includes mainly five elements:
• The Client
• The Client stub (stub: Piece of code used for converting parameters)
• The RPCRuntime (RPC Communication Package)
• The Server stub
• The Server

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 43
43
Functions of RPC Elements
 The Client
• It is user process which initiates a remote procedure call
• The client makes a perfectly normal call that invokes a corresponding procedure in the
client stub.
 The Client stub
• On receipt of a request it packs a requirements into a message and asks to RPCRuntime to
send.
• On receipt of a result it unpacks the result and passes it to client.
 RPCRuntime
• It handles transmission of messages between client and server.
 The Server stub
• It unpacks a call request and make a perfectly normal call to invoke the appropriate
procedure in the server.
• On receipt of a result of procedure execution it packs the result and asks to RPCRuntime
to send.
 The Server
• It executes a appropriate procedure and returns the result from a server stub.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 44
44
RPC Mechanism
Client computer Server computer

Local Local Execute procedure


return call
server Unmarshal Marshal
stub arguments results
Unmarshal Marshal client
results arguments stub
Select procedure

Receive Send Communication Receive Send


reply request module request reply

Call packet
Result packet

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 45
45
Steps in a Remote Procedure Call
1) The client calls a local procedure, called the client stub.
2) Network messages are sent by the client stub to the remote system (via a system call
to the local kernel using sockets interfaces).
3) Network messages are transferred by the kernel to the remote system via some
protocol (either connectionless or connection-oriented).
4) A server stub, sometimes called the skeleton, receives the messages on the server.
It unmarshals the arguments from the messages.
5) The server stub calls the server function, passing it the arguments that it received from
the client.
6) When server function is finished, it returns to the server stub with its return values.
7) The server stub converts the return values, if necessary, and marshals them into one or
more network messages to send to the client stub.
8) Messages get sent back across the network to the client stub.
9) The client stub reads the messages from the local kernel.
10) The client stub then returns the results to the client function, converting them from
the network representation to a local one if necessary.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 46
46
Case Studies : Sun RPC
 Interface definition language: XDR
• a standard way of encoding data in a portable fashion between
different systems;
 Interface compiler: rpcgen
• A compiler that takes the definition of a remote procedure
interface, and generates the client stubs and the server stubs;
 Communication handling: TCP or UDP
 Version: RPCSRC 3.9 (4.3BSD UNIX)
• A run-time library to handle all the details.
 See more information on RPC implementation at
www.cs.gsu.edu/~cscyip/csc4320

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 47
47
Case Studies : DCE RPC
• DCE: Set of components designed by the Open Group (merger of
OSF and X/Open) for providing support for distributed applications
• Distributed file system service, time service, directory service
• Similar to Sun’s RPC, Interfaces written in a language called
Interface Definition Notation (IDN)
• Definitions look like function prototypes
• Unique ID generator
• Run-time libraries, One for TCP/IP and one for UDP/IP
• Authenticated RPC support with DCE security services.
• Integration with DCE directory services to locate servers.

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 48
48
THANK YOU
dipak.ramoliya@darshan.ac.in

Unit:2
Unit:2 Communication
Communication in
in DOS
DOS Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology 49
49

S-ar putea să vă placă și