1
Page 1 Page 1
Remote Procedure Calls
Paul Krzyzanowski pxk@cs.rutgers.edu
Distributed Systems
Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Page 2
Distributed Systems Remote Procedure Calls Paul Krzyzanowski - - PDF document
Distributed Systems Remote Procedure Calls Paul Krzyzanowski pxk@cs.rutgers.edu Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License. Page 1 Page 1 Problems with sockets
Page 1 Page 1
Paul Krzyzanowski pxk@cs.rutgers.edu
Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Page 2
Page 3
Page 4 Page 4
Page 5
Page 6
x = f(a, “test”, 5); The compiler parses this and generates code to:
a. Push the value 5 on the stack b. Push the address of the string “test” on the stack c. Push the current value of a on the stack d. Generate a call to the function f
In compiling f, the compiler generates code to:
and issue a return instruction
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
Page 18
Page 19
Page 20 Page 20
Page 21
Page 22
Page 23
Page 24
main() { unsigned int n; char *a = (char *)&n; n = 0x11223344; printf("%02x, %02x, %02x, %02x\n", a[0], a[1], a[2], a[3]); } Output on a Pentium: 44, 33, 22, 11 Output on a PowerPC: 11, 22, 33, 44
Page 25
Page 26
Page 27
Page 28
(Birrell & Nelson’s 1984 proposal)
Page 29
Page 30
Page 31
Page 32
Page 33
Page 34
Page 35
Page 36
Page 37
client code (main) server functions client stub headers server skeleton data conv. data conv.
Code you write Code RPC compiler generates
Page 38
Page 39
Page 40
Page 41 Page 41