Lesson 4d Flashcards
parallel
How do you ensure safety when client server? (even on the same machine)?
make sure that the client and server are in different address spaces (protection domains)
What is impacted by having separate client server address spaces?
performance
what happens in terms of address space during RPC?
The client traps into the kernel and copies to a buffer there. This buffer is sent to the server. On return the server traps into the kernel, fills out a buffer, and returns that to the client. 2 kernel traps, 2 context switches, 1 procedure execution, 4 copying stuff from user address space to kernel
what is a main performance concerns when comparing function calls and RPC?
- RPC happens at runtime
- func call happens at compile time (I guess they mean linking and optimization)
what is a main concern that needs to be optimized for RPC?
Copying Overhead
what makes the RPC msg for the client
client stub
Steps in copying overhead
1) client stub on the client stack to RPC msg
2) RPC msg to kernel buffer
3) kernel buffer to server domain
4) server domain to server stub on the server stack
what to focus on during optimization
Not one-time cost. Focus on recurring cost
Name server for RPC
place where client can find out which procedures are available on the server and retrieve binding information
what is the PD of RPC
procedure descriptor contains, Entry Point (address), Stack Size (max space), Number of Calls (simultaneous calls handled)
how are address spaces shared
a shared memory region is created that is mapped to the client address space and the server address space
where does the server stub copy the arguments when making RPC cheap?
copies from the a-stack (shared memory) into the e-stack (execution stack)
where does the server place results (when making RPC cheap)
Back into shared memory (a-stack). User space
what happens during the return kernel traps (when making rpc cheap)
thre thread is adjusted to continue where the client left off (re-doctor)
different between original rpc copy overhead and cheap version?
Original: rpc msg -> kernel buffer -> server domain -> server stack (4)
New: a-tack -> server stack (2)