Download presentation
Presentation is loading. Please wait.
1
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, Henry M. Levy ACM Transactions Vol. 8, No. 1, February 1990, pp. 37-55 presented by Ian Dees for PSU CS533, Jonathan Walpole February 2, 2009
2
sharing resources inside the kernel
3
“protection domains” like address spaces; may or may not be address spaces
4
traditional approaches capability systems vs. remote procedure call
5
remote procedure call inspired by distributed computing separate address spaces coarse-grained access messages wrapped in stubs and proxies
6
applying RPC ideas locally RPC model “appropriate for managing subsystems, even those not primarily intended for remote operation” but how to make message passing efficient?
7
naïve approach treat local as a special case of remote treat atomic parameters as a special case of structured data
8
instead, make the common case fast
9
most calls are local even in distributed systems
11
most parameters are simple even in complex APIs
13
sources of overhead stubs message copying sender validation message queueing thread scheduling context switching thread dispatch
14
sender validation when should the kernel check permissions?
15
(capability systems) single address space for parameter passing fine-grained: token ≈ pointer + permissions principle of least privilege
16
analogies in user space FILE* f = fopen("path/to/file", "r"); LPSECURITY_ATTRIBUTES
17
advantages / disadvantages + eliminate many stability / security pitfalls - cumbersome to program - difficult to implement efficiently
18
existing optimizations memory mapping handoff scheduling global message buffers
19
LRPC’s four techniques
20
1. simple control transfer look up addresses once, at discovery time (clerks and bindings) server uses caller’s thread return directly to caller cache execution stacks for reuse
21
2. simple data transfer map argument stacks into both spaces aggressively reduce copies (but call-by-reference involves an extra copy) fall back on marshaling
22
3. simple stubs server stub branches straight to procedure generate simple assembly for common cases exceptions, large parameters fall back to RPC
23
4. design for concurrency distribute domains across processors monitor concurrency misses and wake CPUs use fine-grained locking of argument stacks
24
edge cases remote vs. local activation stack size limits domain termination
25
results
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.