Professional Documents
Culture Documents
UNIT 1 - INTRODUCTION
• Deals with software- It gives an impression to the users that they are
dealing with a single system.
Features of DS
• Communication is hidden from the user
• Resource sharing is possible in ds
• DS act as fault tolerant systems
Need of DS
•Share resource is main motivation of distributed systems.
2.Networking problems
3.Security problems
Significances of DS
• Concurrency
Example: Sharing resources such as web pages or files when necessary
• No global clock
Programs need to cooperate and coordinate their actions by exchanging messages.
Limit to the accuracy
Only communication is sending by messages.
• Independent Failures
Each component of the system can fail independently and leaving the others still
running
Examples of DS
• The Internet
• An Intranet
• Mobile & Ubiquitous computing
Main Motivation
• Sharing of resources
Example: WEB
• 1) Communication performance
• 2) Global notion of time.
Failure Model
• In a DS, both processes and communication channels may fail – i.e.,
they may depart from what is considered to be correct or desirable
behavior.
• Omission Failure
• Arbitrary Failure
• Timing Failure
Timing failure:
skew.
Security model
• The security of a DS can be achieved by securing the processes and
the channels used in their interactions and by protecting the objects
that they encapsulate against unauthorized access.
Remote Procedure Call
• Is a protocol that one program can use to request a service from a program located
in another computer in a network without having to understand network details.
• A procedure call is also sometimes known as a function call or a subroutine call.
• The requesting program is a client and the serviceproviding program is the
server.
• When program statements that use RPC are compiled into an executable
program, a stub is included in the compiled code that acts as the representative of
the remote procedure code.
• the server includes a runtime program and stub that interface with the remote
procedure itself.
RPC
STUBS
• When the calling process calls a procedure, the action performed by that
procedure will not be the actual code as written, but code that begins
network communication.
• It has to connect to the remote machine, send all the parameters down to
it, wait for replies, do the right thing to the stack and return. This is the
client side stub.
• The server side stub has to wait for messages asking for a procedure to
run.
• It has to read the parameters, and present them in a suitable form to
execute the procedure locally. After execution, it has to send the results back
to the calling process.
HOW RPC WORKS?
• An RPC is analogous to a function call. Like a function call, when an
RPC is made, the calling arguments are passed to the remote
procedure and the caller waits for a response to be returned from the
remote procedure.
• The client makes a procedure call that sends a request to the server
and waits.
• When the request arrives, the server calls a dispatch routine that
performs the requested service, and sends the reply to the client.
• After the RPC call is completed, the client program continues. RPC
specifically supports network applications.
Contd…
RPC APPLICATION
DEVELOPMENT
• To develop an RPC application the following steps are needed: •
1) Specify the protocol for client server communication
2) Develop the client program
3) Develop the server program
The programs will be compiled separately.
The communication protocol is achieved by generated stubs and
these stubs and rpc (and other libraries) will need to be linked in.
Contd…
STUB
• The client calls the local stub procedure. The stub packages up the parameters into a network
message. This is called marshaling.
• Networking functions in the O/S kernel are called by the stub to send the message.
• The kernel sends the message(s) to the remote system. This may be connection-oriented or
connectionless.
• A server stub unmarshals the arguments from the network message.
• The server stub executes a local procedure call.
• The procedure completes, returning execution to the server stub.
• The server stub marshals the return values into a network message.
• The return messages are sent back.
• The client stub reads the messages using the network functions.
• The message is unmarshalled. And the return values are set on the stack for the local process.
Remote Object Invocation
• Middleware layers
Distributed Objects
Issues in implementing RMI
• Parameter Passing
• ❒ Request-Reply Protocol
• ❍ Handling failures at client and/or server
• ❒ Supporting persistent objects, object adapters, dynamic
invocations, etc.
Handling failures
Types of failure
❍ Client unable to locate server
❍ Request message lost
❍ Reply message lost
❍ Server crashes after receiving a request
❍ Client crashes after sending a request
GROUP COMMUNICATION
• Group communication is a service where a message is sent to a group
and then this message is delivered to all members of the group.
• There are t
• Unicast: Process to process communication
• Broadcast: Communication to all the process
• Multicast: Communication only to a group of processes hree
communication modes:
Unicast
• Unicast is the term used to describe communication where a piece of
information is sent from one point to another point. In this case there
is just one sender, and one receiver.
Broadcast
• Multicast is the term used to describe communication where a piece
of information is sent from one or more points to a set of other
points. In this case there is may be one or more senders, and the
information is distributed to a set of receivers (theer may be no
receivers, or any other number of receivers).
MULTICAST COMMUNICATION