CS533 Concepts of Operating Systems

Slides:



Advertisements
Similar presentations
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
Advertisements

The Spring System (and its trusty sidekick, Subcontract) Sun Microsystems.
Remote Procedure Call Design issues Implementation RPC programming
User-Level Interprocess Communication for Shared Memory Multiprocessors Bershad, B. N., Anderson, T. E., Lazowska, E.D., and Levy, H. M. Presented by Akbar.
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Lightweight Remote Procedure Call B. Bershad, T. Anderson, E. Lazowska and H. Levy U. Of Washington.
Fast Communication Firefly RPC Lightweight RPC  CS 614  Tuesday March 13, 2001  Jeff Hoy.
Lightweight Remote Procedure Call BRIAN N. BERSHAD THOMAS E. ANDERSON EDWARD D. LAZOWSKA HENRY M. LEVY Presented by Wen Sun.
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
Presented By Srinivas Sundaravaradan. MACH µ-Kernel system based on message passing Over 5000 cycles to transfer a short message Buffering IPC L3 Similar.
G Robert Grimm New York University Lightweight RPC.
Distributed Systems Lecture #3: Remote Communication.
CS533 Concepts of Operating Systems Class 8 Remote Procedure Call & LRPC.
CS533 Concepts of Operating Systems Class 20 Summary.
User-Level Interprocess Communication for Shared Memory Multiprocessors Bershad, B. N., Anderson, T. E., Lazowska, E.D., and Levy, H. M. Presented by Chris.
CS533 Concepts of Operating Systems Class 8 Shared Memory Implementations of Remote Procedure Call.
Implementing Remote Procedure Calls Authors: Andrew D. Birrell and Bruce Jay Nelson Xerox Palo Alto Research Center Presenter: Jim Santmyer Thanks to:
User Level Interprocess Communication for Shared Memory Multiprocessor by Bershad, B.N. Anderson, A.E., Lazowska, E.D., and Levy, H.M.
CS533 Concepts of Operating Systems Class 4 Remote Procedure Call.
Improving IPC by Kernel Design Jochen Liedtke Presented by Ahmed Badran.
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, Henry M. Levy ACM Transactions Vol. 8, No. 1, February 1990,
USER LEVEL INTERPROCESS COMMUNICATION FOR SHARED MEMORY MULTIPROCESSORS Presented by Elakkiya Pandian CS 533 OPERATING SYSTEMS – SPRING 2011 Brian N. Bershad.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
CS533 Concepts of Operating Systems Class 4 Remote Procedure Call.
.NET Mobile Application Development Remote Procedure Call.
Remote Procedure Calls Taiyang Chen 10/06/2009. Overview Remote Procedure Call (RPC): procedure call across the network Lightweight Remote Procedure Call.
1 Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska and Henry M. Levy Presented by: Karthika Kothapally.
CS533 Concepts of Operating Systems Class 9 Lightweight Remote Procedure Call (LRPC) Rizal Arryadi.
CS510 Concurrent Systems Jonathan Walpole. Lightweight Remote Procedure Call (LRPC)
Lightweight Remote Procedure Call (Bershad, et. al.) Andy Jost CS 533, Winter 2012.
CS533 Concepts of Operating Systems Jonathan Walpole.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
CS533 Concepts of Operating Systems Jonathan Walpole.
Remote Procedure Calls Adam Smith, Rodrigo Groppa, and Peter Tonner.
3.1 Silberschatz, Galvin and Gagne ©2009Operating System Concepts with Java – 8 th Edition Chapter 3: Processes.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
Lightweight Remote Procedure Call BRIAN N. BERSHAD, THOMAS E. ANDERSON, EDWARD D. LASOWSKA, AND HENRY M. LEVY UNIVERSTY OF WASHINGTON "Lightweight Remote.
The Mach System Abraham Silberschatz, Peter Baer Galvin, Greg Gagne Presentation By: Agnimitra Roy.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Networking Implementations (part 1) CPS210 Spring 2006.
LRPC Firefly RPC, Lightweight RPC, Winsock Direct and VIA.
Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy. Presented by: Tim Fleck.
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Implementing Remote Procedure Call Landon Cox February 12, 2016.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Kernel Design & Implementation
OS Organization Continued
B. N. Bershad, T. E. Anderson, E. D. Lazowska and H. M
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Sarah Diesburg Operating Systems COP 4610
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
CS533 Concepts of Operating Systems Class 10
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Chapter 1 Introduction to Operating System Part 5
By Brian N. Bershad, Thomas E. Anderson, Edward D
Fast Communication and User Level Parallelism
Improving IPC by Kernel Design
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Presented by Neha Agrawal
Prof. Leonardo Mostarda University of Camerino
Presented by: SHILPI AGARWAL
Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M
CS533 Concepts of Operating Systems Class 11
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Presentation transcript:

CS533 Concepts of Operating Systems Jonathan Walpole

Lightweight Remote Procedure Call (LRPC)

Overview Observations Performance analysis of RPC Lightweight RPC for local communication Performance

Remote Procedure Call An IPC mechanism for invoking a subroutine in another address space The receiver might reside on the same physical system or over a network Provides a large-grained protection model The call semantics make it appear as though only a normal procedure call was performed Stubs interface to a runtime environment, which handles data marshalling OS handles low-level IPC - Protection domain boundaries hidden by stubs

Steps in a Traditional RPC Client Application Client Stub Client Runtime Library Client Kernel Server Application Server Stub Server Runtime Library Server Kernel Potentially shared in a single-system RPC transport layer

RPC in Microkernel Systems Small-kernel systems use RPC - Separate components are placed in disjoint address spaces (protection domains) - Communication between components uses RPC (message passing) Advantages: modularity, simplification, failure isolation, and distribution transparency But the control transfer facilities of RPC are not optimized for same-machine control transfer - This leads to inefficiency

Frequency of Remote Activity The Use of RPC Systems The common case for RPC: - is cross-domain (not cross-machine) - involves relatively simple parameters - can be optimized Frequency of Cross-Machine Activity Frequency of Remote Activity Operation System Percentage of operations that cross machine boundaries V 3.0 Taos 5.3 Sun UNIX+NFS 0.6

Parameter Size and Complexity - 1,487,105 cross-domain procedure RPCs observed during one four-day period - 95% were to 10 procedures; 75% were to 3 procedures - None of them involved complex arguments - Most involve a relatively small amount of data transfer

Performance of Cross-Domain RPC The theoretical minimum time for a null cross-domain operation includes time for - Two procedure calls - Two traps Two virtual memory context switches The cross-domain performance, measured across six systems using the Null RPC, varies from over 300% to over 800% of the theoretical minimum

Overhead in Cross-Domain RPC Stub Overhead: stubs allow cross-machine RPC, but inefficient for the common case of local RPC calls Message Buffer Overhead: client/kernel, kernel/server, server/kernel, kernel/client Access Validation: the kernel must validate the message sender on call and again in return Message Transfer: messages are enqueued by the sender and dequeued by the receiver Scheduling: separate, concrete threads run in client and server domains Context Switch: in going from client to server Dispatch: the server must receive and interpret the message

Lightweight RPC (LRPC) LRPC aims to improve the performance of cross-domain communication relative to RPC The execution model is borrowed from a protected procedure call - Control transfer proceeds by way of a kernel trap; the kernel validates the call and establishes a linkage - The client provides an argument stack and its own concrete thread of execution The programming semantics and large-grained protection model are borrowed from RPC - Servers execute in private protection domains - Each one exports a specific set of interfaces to which clients may bind - By allowing a binding, the server authorizes a client to access its procedures

LRPC High-Level Design Client Context Server Context Control Flow Control Flow sending path E-stack Kernel thread return path Physical Memory Virtual Memory Virtual Memory A-stack

Implementation Details Execution of the server procedure is made by way of a kernel trap The client provides the server with an argument stack and its own concrete thread of execution The argument stacks (A-stacks) are shared between client and server; the execution stacks (E-stacks) belong exclusively in the server domain - A-stacks and E-stacks are associated at call time - Each A-stack queue is guarded by a single lock The client must bind to an LRPC interface before using it; binding: - establishes shared segments between client and server - allocates bookkeeping structures in the kernel - returns a non-forgeable binding object to the client, which serves as the key for accessing the server (recall capability systems) On multiprocessors, domains are cached on idle processors (to reduce latency)

Performance The measurements below were taken across 100,000 cross-domain calls in a tight loop LRPC/MP uses the domain-caching optimization for multiprocessors LRPC performs a context switch on each call Table IV. LRPC Performance of Four Tests (in microseconds) Test Description LRPC/MP LRPC Taos Null The Null cross-domain call 125 157 464 Add A procedure taking two 4-byte arguments and returning one 4-byte argument 130 164 480 BigIn A procedure taking one 200-byte argument 173 192 539 BigInOut A procedure taking and returning one 200-byte argument 219 227 636

Discussion Items When the client thread is executing an LRPC, does the scheduler know it has changed context? What is a context switch?