Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

aup (8SR3)U6 1 / 5

UNIT-VI
Unit-IV: Performance; IPC performance, disk performance, network performance. Introduction to remote
procedure calls, transparency issues, Sun RPC, Linux RPC, Xerox courier, Appollo RPC. (ch 17&18 )
Section 17.5/#: Network performance
Section 18.1/#: Steps in RPC (fig 18.1)/ RPC Model
Section 18.2/#: Transparency issue
Section 18.3/#: Sun RPC F18.3/# files involved in Sun RPC
Section 18.5/#: Apollo RPC
Section 18.4/#: Xerox RPC

Performance:
• Performance of processes communicating on the single host
• Performance of processes communicating on different hosts

IPC: pipes, FIFOs, messages, semaphore, sockets and shared memory…

o Messages sent per second


o Time required executing system calls (e.g. msgsnd, read, write, msgrcv…..)

Network performance:
 Maximum throughput of 10 megabits/sec Ethernet: with minimum interpacket gap, (i.e.
22 B Ethernet header + 20 B IP header + 20 B TCP header + 4 B Ethernet trailer)
Here maximum theoretical throughput is 1,185,840 bytes/sec.
Maximum Ethernet packet size is 1464 bytes
 M2?
 The single host transmitting 1024 byte packet as fast as it can, are able to obtain
throughput of 1000 packets/sec. This corresponds to 1,203,920 bytes/sec
 Performance between VAX750 & VAX780 on an Ethernet shows TCP throughput
between 80,000 bytes/sec to 100,000 byets/sec
 Dsf
 Dsfdsf
 Dsf
aup (8SR3)U6 2 / 5

Procedure Calls:
 In general a function call or a subroutine call is called as procedure call.
 Procedure call is a method of transferring control from a process to another, with return
of control to the caller.
 Many computer architectures implement this with instruction of the form “jump-to-
subroutine”
 There can be one or more return values from the called procedure
 These types of procedure calls are called as “local procedure calls”

Remote Procedure Calls:


 In RPC the process on local system invokes a procedure on the remote system
 For programmer it appears as to be a normal procedure call
 The term “request” to refer to client calling the remote procedure
 The term “response” to describe the remote procedure returning its results to the client.

process Procedure call


Procedure return Client Serve
call Proces r Same
s Proces host
Return s

1 Conc
2 ept
Of
Host 1 Host 2 RPC

3 Procedure call
Client Serve
Proces r Different
s Proces hosts
Return s
Interconnected
N/W

Here Fig-1: Local procedure call, Fig-2: remote procedure call on a


single host also called as Doors and Fig-3: RPC between hosts. Three
different types of calls.

There are three different implementations of RPC:


• Sun Microsystems Open Network Computing (ONC). Two parts of ONC are RPC, The RPC specification,
and XDR, the eXternal Data Representation standard. Sun RPC uses either TCP or UDP as the transport
protocol.
• Xerox Courier. It’s early implementation of RPC, It includes RPC model, build on XNS SPP as the
transport protocol, and a data representation standard.
• Apollo’s Network Computing Architecture (NCA). NCA/RPC specifies a remote procedure call protocol
and NDR, Network Data Representation, defines the data representation standard.

e.g. Sun RPC


When we build an application, our first choice is whether to
1. Build one huge monolithic program that does everything, or
2. Distribute the application among multiple processes that communicate with each other.

If we choose the second option, the next choice is whether to


2a. assume that all the processes run on the same host (allowing IPC to be used for communication
between the processes), or
2b. assume that some of the processes will run on other hosts (necessitating some form of network
communication among the processes).
aup (8SR3)U6 3 / 5

RPC MODEL (Remote Procedure Call Model)


RPC are different from LPC? (Home work)

STEPS in RPC
There are different steps which take place in RPC; they are executed in the order
Client process Server process

client server
routines routines
Fig: Remote Procedure
Call (RPC) Model
Local proc’r call (1) (10) (6) (5)

client server
stub stub

System call (2) (9) (7) (4)

network (8) network


routines routines
(3) = network communications
Local kernel remote kernel

1. Client calls a local procedure c/d as “client stub”


 Client stub is a server procedure that it wants to call.
 Client stub is a package up the arguments to the remote procedure.
 It puts arguments in the standard format.
 It builds one or more network messages
 The packaging of the client’s arguments into a network message is c/d as “marshaling”
2. N/W Messages are sent to the remote system by client stub (requires system call)
3. The network messages are transferred to the remote system. Either CO or CL protocol
is used.
4. A server stub procedure is waiting on the remote system for the client’s request. It
“unmarshals” the arguments from the network messages and possibly converts them.
5. A “server stub” procedure executes a local procedure call to invoke the actual server
function, passing it the arguments that it received in the network messages from the
“client stub”.
6. When the server procedure is finished, it returns to the server stub, returning whatever
its return values are.
7. The server stub converts the return values, if necessary, and marshals them into one or
more network messages to send back to the client stub.
8. The messages get transferred back to across the network to the client stub.
9. The client stub reads the network messages from the local kernel.
10. After possibly converting the return values, the client stub finally returns to the client
function. This appears to be a normal procedure return to the client.

#694
Transparency issues
aup (8SR3)U6 4 / 5

Explain why the contents of the file data are output to the terminal in the
following example, when the program ttyname one generates output and never
reads its input.
$cat data a file with two lines
hello,
world
$pty –i < data ttyname -i says ignore eof on stdin,
hello, where did these two lines come from?
world
fd 0: /dev/ttyp5 we expect these three lines from ttyname
fd 1: /dev/ttyp5
fd 2: /dev/ttyp5

$who
$pty ttyname

/etc/ttytype
/etc/inittab
$echo $ttyname
Your unix – ultimate guide : sumitbha das (tmh)

ASSIGNMENT QUESTIONS:
1 What is network performance? Explain in brief.
2 Explain in brief the steps involved in RPC calls.
3 Explain Remote Procedure Call Model in brief.
4 What are issues related to transparency.
5 Explain in brief the model for remote procedure calls.
6 Compare following three RPC implementations
(i) SUN RPC
(ii) Xerox RPC
(iii) Apollo RPC
7 What files are needed in generating SUN RPC.
aup (8SR3)U6 5 / 5

You might also like