Implementing Remote Procedure Calls: Andrew Birrell and Bruce Nelson
Implementing Remote Procedure Calls: Andrew Birrell and Bruce Nelson
Calls
Andrew Birrell and Bruce Nelson
Presented by
Phil Howard
Why?
Consider
#include <stdio.h>
int main()
{
printf("hello world!\n");
return 0;
}
What Happens
main main
printf glibc
kernel IO kernel
update_window X
update_display
kernel IO kernel
But what if
Console Window
main
What Happens
my_var.stuff1 = 0x12345678;
printf("%X %X %X %X\n",
my_var.stuff2[0], my_var.stuff2[1],
my_var.stuff2[2], my_var.stuff2[3]);
return 0;
}
Passing Data
What's the output?
12 34 56 78
or
78 56 34 12
Passing data
Build a message that includes:
• Who and what's being called
• Identity of the caller
• Data values in known byte order
Issues
• Finding the callee
• Passing data
• Implementation
• Exceptions
• Optimizations
Implementation
return;
Implementation
Clients Servers
Threaded Event Driven
Issues
• Finding the callee
• Passing data
• Implementation
• Exceptions
• Optimizations
Exceptions
What can happen in "normal" procedures?