Upload
abner-copeland
View
214
Download
1
Tags:
Embed Size (px)
Citation preview
The PeregrineHigh-Performance
RPC System
David B. JohnsonWilly ZwaenepoelSoftware—Practice & Experience February 1993.
Benefits of RPC
Network programming made easy RPC package takes care of timeouts, out of
order packets RPC package takes care of data translation
Server
RPC Model
Client Client-stub Runtime Runtime Server-stub
call packet
result packet
call
work
returnpack result
unpack argumentreceive
transmit
transmit
receiveunpack result
pack argument
local return
local call
Key RPC Optimizations in Peregrine Arguments (results) are directly transmitted from
client (server) address space No data representation conversion Both call and return packets are transmitted using
pre-allocated headers No thread specific state is saved after the execution
of call at the server Arguments are mapped into the server address
space avoiding copying Multi-packet argument transmission avoids copying
in critical path
Packet Header
Type service
IP total length
IP identification Frag. offset
Source IP
Destination IPRPC packet type RPC Packet data length
Packet sequence numberClient IdentifierServer Identifier
Procedure number
IHL
flags
Call sequence number
RPC total message length
TTL Check Sum
Version
Role of Stubs
Client Stub Kernel trap to send call message and return Builds buffer descriptors Data translation
Server Stub Call server procedure kernel trap to return results.
Result packet
Sending the result packet Stub builds descriptors Kills server thread
Receiving the result packet In-out and out buffers are copied
Effectiveness of Optimizations
Arguments (results) are directly transmitted from client (server) address space
No data representation conversion Both call and return packets are transmitted using
pre-allocated headers No thread specific state is saved after the
execution of call at the server Arguments are mapped into the server address
space avoiding copying Multi-packet argument transmission avoids
copying in critical path