1 / 20

Lightweight Remote Procedure Call

Lightweight Remote Procedure Call. BRIAN N. BERSHAD THOMAS E. ANDERSON EDWARD D. LAZOWSKA HENRY M. LEVY. Presented by Wen Sun. Overview. What is LRPC? Why LRPC?

quon-owens
Télécharger la présentation

Lightweight Remote Procedure Call

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lightweight Remote Procedure Call BRIAN N. BERSHAD THOMAS E. ANDERSON EDWARD D. LAZOWSKA HENRY M. LEVY Presented by Wen Sun

  2. Overview • What is LRPC? • Why LRPC? • Design and Implementation of LRPC • The performance

  3. What is RPC? RPC Cross-Machine Cross-Domain

  4. What is LRPC? • LRPC is a communication facility designed & optimized for cross-domain communication in the same machine.

  5. Overview • What is LRPC? • Why LRPC? • Design and Implementation of LRPC • The performance

  6. Why LRPC? • “In existing RPC systems, cross-domain calls are implemented in terms of the facilities required by cross-machine ones”

  7. Cross-domain dominates !

  8. Cross-domain is simple ! Most frequent case: less than 200 bytes

  9. Cross-Domain RPC Performs bad !

  10. Causes of Overhead in RPC • Stub overhead the caller and receiver are on the same kind of architecture, no need to marshal parameters and results into an intermediate, architecture independent representation Simple stubs (simple model of control and data transfer) • Message buffer overhead (four copy operation) both are in the same physical memory space LRPC only has one time copy from the client stub to A-stack both are in the same physical memory space • Message transfer No message transfer in LRPC ! A-stack ! • Dispatch

  11. Causes of Overhead in RPC • Access validation (validate send and return) LRPC doesn’t validate the return • Scheduling • Context switch Avoid context switch on multi-CPU by using caching domain on idle processor

  12. Overview • What is LRPC? • Why LRPC? • Design and Implementation of LRPC • The performance

  13. Copy args Design and Implementation Client Server A stack A Execute procedure and copy results User stub stub Kernel Trap to Kernel Upcall Return (trap) Borrowed from Rizal Arryadi’s powerpoint (winter 2005)

  14. Binding Server name +interface interface Server Clerk PDL notify Import call client kernel Biding project (key) + A-stack list Linkage record + A-stack

  15. Calling • (1)Get an A-stack • (2)Copy arguments into A-stack • (1)verifies binding, procedure ID, A-stack • (2)locate the correct PD & linkage • (3)ensures that no other thread using A-stack/linkage pair • (4)Records caller’s return address and current stack pointer in the linkage • (5)Pushes linkage onto top of stack of linkages kept in thread’s control block • (6)Finds E-stack in the server’s domain • (7)Updates thread’s user stack pointer to run off the new E-stack • (8)Reloads processor’s Virtual Memory registers with those of the server domain Client Return result Call Into Client Stub • Trap (Binding Object, AS pointer, procedure ID) • (1)Copy immutable args from A-stack to a new region • (2)Call server procedure, server executes • (3)Copy return value into A-stack Kernel Trap back Upcall into Server Stub

  16. Overview • What is LRPC? • Why LRPC? • Design and Implementation of LRPC • The performance

  17. The performance (I) Roughly three times faster than SRC RPC

  18. The performance (II) 21 = 18 ( client stub) + 3 (server stub) 27 (binding validation + linkage management)

  19. The performance (III) lock contention !

  20. Overview • What is LRPC? • Why LRPC? • Design and Implementation of LRPC • The performance

More Related