Professional Documents
Culture Documents
CS 194:
Distributed Systems Application
Communication Protocols, RPC Presentation
Session
Computer Science Division Transport
Department of Electrical Engineering and Computer Sciences
University of California, Berkeley Network
Berkeley, CA 94720-1776 Datalink
Physical
EECS122 - UCB 1
1
Application
Transport
Internet’s Hourglass Network
Link
Physical Layer
Physical
Signal
Adaptor
Adaptor Adaptor
Adaptor
Application Layer
• Service: move information between two systems
connected by a physical link
Network Layer
• Interface: specifies how to send a bit
Datalink Layer • Protocol: coding scheme used to represent a bit,
voltage levels, duration of a bit
Physical Layer
• Examples: coaxial cable, optical fiber links;
transmitters, receivers
Application Application
Transport Transport
Network
Link
Datalink Layer Network
Link
Network Layer
Physical Physical
• Service: • Service:
– Framing (attach frame separators)
– Deliver a packet to specified network destination
– Send data frames between peers
– Perform segmentation/reassembly
– Medium access: arbitrate the access to common
– Others
physical media
• Packet scheduling
– Error detection and correction • Buffer management
• Interface: send a data unit (packet) to a • Interface: send a packet to a specified destination
machine connected to the same physical media
• Protocol: define global unique addresses; construct
• Protocol: layer addresses, implement Medium routing tables
Access Control (MAC) (e.g., CSMA/CD)…
Application Application
Transport Transport
Network
Link
Datagram (Packet) Switching Network
Link
Datagram (Packet) Switching
Physical Physical
Host C Host C
router 5 router 5
Host B Host B
router 7 Host E router 7 Host E
router 6 router 6
router 4 router 4
2
Application
Transport
Network
Link
Transport Layer End-to-End View
Physical
Proc. A Proc. B
(port 10) data data (port 7)
Machine
Process
.
. sum(i, j)
. int i, j;
n = sum(4, 7); {
. return (i+j);
.
.
}
3
Example: Remote Procedure Call Client and Server Stubs
Stubs • Principle of RPC between a client and server program.
Client Server
Process Process
.
. sum(i, j)
. message message int i, j;
n = sum(4, 7); sum sum {
.
. 4 4 return (i+j);
. 7 7 }
OS OS
a) A procedure
b) The corresponding message.
4
Binding a Client to a Server Doors
• The principle of using doors as IPC mechanism.
• Client-to-server binding in DCE.
2-15
5
Server Crashes Client Crashes
• Two cases • Let’s the server computation orphan
– Crash after execution • Orphans can
– Crash before execution
– Waste CPU cycles
• Three possible semantics – Lock files
– At least once semantics
– Client reboots and it gets the old reply immediately
• Client keeps trying until it gets a reply
– At most once semantics
• Client gives up on failure
– Exactly once semantics
• Can this be correctly implemented?
2-12