Masking the Overhead of Protocol Layering CS514: Intermediate Course in Operating Systems Robbert van Renesse Cornell University Lecture 14 Oct. 12.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 9 Distributed Systems Architectures Slide 1 1 Chapter 9 Distributed Systems Architectures.
Advertisements

Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
VIA and Its Extension To TCP/IP Network Yingping Lu Based on Paper “Queue Pair IP, …” by Philip Buonadonna.
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
Distributed Systems Architectures
1 Introducing Collaboration to Single User Applications A Survey and Analysis of Recent Work by Brian Cornell For Collaborative Systems Fall 2006.
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
University of Kansas Construction & Integration of Distributed Systems Jerry James Oct. 30, 2000.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC-681/781 Distributed Computing Systems Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Modularity and Costs Greg Busby Computer Science 614 March 26, 2002.
CprE 458/558: Real-Time Systems
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
CS211/Fall /06 Outline for This Lecture Application of e2e over wireless Application Level Framing Integrated Layer Processing Course Project Introduction.
Course Instructor: Aisha Azeem
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
Gursharan Singh Tatla Transport Layer 16-May
CS510 Concurrent Systems Jonathan Walpole. Lightweight Remote Procedure Call (LRPC)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
ISO Layer Model Lecture 9 October 16, The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
Fault Tolerance via the State Machine Replication Approach Favian Contreras.
1 소프트웨어공학 강좌 Chap 9. Distributed Systems Architectures - Architectural design for software that executes on more than one processor -
B.Ramamurthy9/19/20151 Operating Systems u Bina Ramamurthy CS421.
Ensemble: A Tool for Building Highly Assured Networks Professor Kenneth P. Birman Cornell University
LWIP TCP/IP Stack 김백규.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
Internet Addresses. Universal Identifiers Universal Communication Service - Communication system which allows any host to communicate with any other host.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
SPREAD TOOLKIT High performance messaging middleware Presented by Sayantam Dey Vipin Mehta.
University of the Western Cape Chapter 12: The Transport Layer.
A Comparative Study of the Linux and Windows Device Driver Architectures with a focus on IEEE1394 (high speed serial bus) drivers Melekam Tsegaye
9 September 2008CIS 340 # 1 Topics reviewTo review the communication needs to support the architectures variety of approachesTo examine the variety of.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
SCALABLE EVOLUTION OF HIGHLY AVAILABLE SYSTEMS BY ABHISHEK ASOKAN 8/6/2004.
Minimizing Communication Latency to Maximize Network Communication Throughput over InfiniBand Design and Implementation of MPICH-2 over InfiniBand with.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved RPC Tanenbaum.
Middleware for Secure Environments Presented by Kemal Altıntaş Hümeyra Topcu-Altıntaş Osman Şen.
Kjell Orsborn UU - DIS - UDBL DATABASE SYSTEMS - 10p Course No. 2AD235 Spring 2002 A second course on development of database systems Kjell.
William Stallings Data and Computer Communications
Ensemble Fault-Tolerance Security Adaptation. The Horus and Ensemble Projects Accomplishments and Limitations Kent Birman, Bob Constable, Mayk Hayden,
November NC state university Group Communication Specifications Gregory V Chockler, Idit Keidar, Roman Vitenberg Presented by – Jyothish S Varma.
LRPC Firefly RPC, Lightweight RPC, Winsock Direct and VIA.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Network Architecture Protocol hierarchies Design Issues for the layers
Group Communication Theresa Nguyen ICS243f Spring 2001.
Building reliable, high- performance communication systems from components Xiaoming Liu, Christoph Kreitz, Robbert van Renesse, Jason Hickey, Mark Hayden,
1 Transport Layer: Basics Outline Intro to transport UDP Congestion control basics.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
K. Salah1 Security Protocols in the Internet IPSec.
Application architectures Advisor : Dr. Moneer Al_Mekhlafi By : Ahmed AbdAllah Al_Homaidi.
Protocol Implementation Modularity and Costs. Outline Of Talk Importance of Modularity The cost of modularity The x-kernel architecture Integrated Layer.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
The Transport Layer Implementation Services Functions Protocols
CS408/533 Computer Networks Text: William Stallings Data and Computer Communications, 6th edition Chapter 1 - Introduction.
CS533 Concepts of Operating Systems
CS703 - Advanced Operating Systems
Software models - Software Architecture Design Patterns
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Presentation transcript:

Masking the Overhead of Protocol Layering CS514: Intermediate Course in Operating Systems Robbert van Renesse Cornell University Lecture 14 Oct. 12

Layering Lecture given by Robbert van Renesse First, some background slides from CS514 in Fall 1999 Then Robbert’s slide set from Thursday October 12

Horus research focal points Extremely high performance despite modularity of architecture Consistency in asynchronous systems that tolerate failures Predictable real-time throughput and failure reaction times Integration with security solutions Use formal methods to verify protocols

Lego Building Blocks for Robustness identify a component or subsystem

Lego Building Blocks for Robustness wrapped component Wrap the component at an appropriate interface. Ideally, the underlying code remains unchanged. Wrapper may transform component to confer property add new interfaces add new interfaces monitor or control component in some way monitor or control component in some way

Lego Building Blocks for Robustness wrapped component Horus wrapper options: Library interposition layer (bsd sockets, Tk/Tcl, Panda Library interposition layer (bsd sockets, Tk/Tcl, Panda Pcode (for MPI), Unix system call layer (for virtual fault- tolerance), explicit Horus library interfaces (HCPI)) Packet filter in O/S or firewall Packet filter in O/S or firewall Potential wrapper: Object code editor Potential wrapper: Object code editor

Potential Wrapper Functions Virtual fault tolerance Authentication, data integrity, encryption Analytic redundancy (behavior checking) Packet filtering Service and resource negotiation Resource use monitoring & management Type enforcement for access control

Lego Building Blocks for Robustness wrapped component In some cases, more than one wrapper might be needed In some cases, more than one wrapper might be needed for the same component, or even the same interface. For example, a data encryption security wrapper might be ``composed’’ with one that does replication for fault-tolerance. “Secure fault-tolerance”

Lego Building Blocks for Robustness wrapped component group of replicas (e.g., for fault tolerance) encrypt vsync ftol Plug in modules implement communication or protocol. The wrapper hides this structure behind the wrapped interface REPLICATE FOR FAULT-TOLERANCE

Lego Building Blocks for Robustness Component wrapped for secure fault-tolerance Environment sees group as one entity group semantics (membership, actions, events) defined by stack of modules encrypt vsync filter sign ftol Horus stacks plug-and-play modules to give design flexibility to developer

Horus Common Protocol Interface Standard used in stackable protocol layers (concealed from application by upper “wrapper” layer). Generalizes group concepts: –Membership –Events that happen to members –Communication actions “Layers bind semantics to interfaces”

How a layer works Layer’s “state” is private, per connection Layer can add headers to messages Idea is to run a protocol with respect to peer layers at other group members Typically lines of code in C, shorter in ML Example: signature layer signs outgoing msgs, strips incoming signatures, uses Kerberos to obtain session keys

Extended virtual synchrony Consistency model used in Horus, reflects Totem/Transis extentions to Isis model Delivery atomicity w.r.t. group views, partition merge through state transfer Optimal availability for conflicting operations (c.f. recent theoretical work) Selectable ordering, user defined stabilization properties, stabilization-based flow control

Horus as an “environment” Builds stacks at runtime, binds to groups Offers threaded or event queue interfaces Standard message handling, header push/pop, synchronization Memory “streams” for memory management Fast paths for commonly used stacks Code in C, C++, ML, Python Electra presents Horus as Corba “ORB”

Examples of existing layers Virtually synchronous process group membership and delivery atomicity Ordering (fifo, causal, total) Flow control and stability Error correction Signatures and encyrption Real-time vsync layers and protocols

Possible future layers? Fault-tolerance through replication, Byzantine agreement, behavior checking Security through intelligent filtering, signatures, encryption, access control Transactional infrastructure Group communication protocols Layers for enforcing performance needs Layers for monitoring behavior and intervening to enforce restrictions, do software fault-isolation Load-sharing within replicated servers Real-time, periodic or synchronized action

Electra over Horus, HOT Developed by Maffeis, presents Horus as a Corba ORB, full Corba compliance Vaysburd: Horus Object Tools Protocol stack appears as class hierarchy Developing a system definition language (SDL) to extend component-oriented IDL with system-wide property information Performance impact minimal

Problems With Modularity Excessive overhead due to headers on packets (each layer defines and pads its own headers, cummulative cost can be high) High computing costs (must traverse many layers to send each packet)

Horus Protocol Accelerator Cuts Overhead From Modularity Van Renesse (SIGCOMM paper) –“Compiles” headers for a stack into a single highly compact header –Doesn’t send rarely changing information –Restructures layers to take “post” and “pre” computation off critical path –Uses “packet filter” to completely avoid running stack in many cases “Beats” a non-layered implementation

Objective Software Engineering and Performance appear at odds: –layering –high-level language Horus reports >50 microseconds per layer You can have good SE and performance! bad performance

Layering is good Modularity Flexibility Easy testing Stacks together like Lego blocks

Problems with Layering Crossing layer boundaries results in –interface calls –non-locality of data and instruction Each layer aligns headers separately Alignment of individual fields not optimal

Losing Performance is Easy Keep headers small Keep processing minimal Round-trip Latency ( æS) Message size (bytes) Raw U-Net

How to Reduce Headers? Mix fields of layers to optimize alignment. Agree on values that are always, or almost always the same -- e.g., addresses, data type (one for each layer), etc. -- rather than sending them always. Piggybacked info often does not need to be included on every message! Typically, the header is now 16 bytes even for as many as 10 layers (down from about 100 bytes). Speeds up communication and demultiplexing.

Reducing Processing Optimize critical path: –1) Place layer state updates (particularly buffering) outside of the critical path. –2) Predict as much of the header of the next message as possible. –3) Use packet filters to avoid layer processing altogether (e.g., calculating or checking CRCs). –4) Combine processing of multiple messages.

Canonical Protocol Processing Each layer can always split its operations on messages and protocol state in two phases: Preprocessing: –- build or check header, but don’t update layer state. E.g., the seqno may be added to the header or checked, but not incremented. Postprocessing: –- update protocol state. E.g., the sequence number may now be incremented.

Shortening the Critical Path First do pre-processing for all layers, followed by actual message send/delivery. Then do all post- processing, updating protocol state. Combine pre-processing with header field prediction to come to an ILP solution. BEFORE AFTER

New Uses for Packet Filters Used for checking and generating unpredictable header fields such as checksums or message lengths. Packet filter code is generated by the layers as they are composed. Preprocessing = bcmp for delivery, or bcopy for sending, plus running the PF, leading to high locality. BEFORE AFTER PF

Other techniques When streaming small messages, pack chunks of them together and deal with them as a single entity. Avoid allocating memory and garbage collection during preprocessing as much as possible.

Architecture Application Network Packer ML Protocol Stack PRESEND PREDELIVER

Overview of Performance Sun Sparc-20, SunOS 4.1.3, U-Net 1.0, Fore SBA Mbit/sec ATM, CSL 1.10 compiled, 4 layer protocol (sliding window), 8-byte messages.

Detailed Round-Trip Times SEND() DELIVER() SEND() DELIVER() POSTSEND DONE POSTDELIVER DONE POSTSEND DONE POSTDELIVER DONE GARBAGE COLLECTED æS

Use of a High-Level Language We achieve similar performance using O’Caml only. The code of the system is 9 times smaller than the C version, 10 times faster using the PA techniques, and lots more robust. O’Caml is a fully capable system language. Tag-free, real-time garbage collector would make the language ideal for systems.

Conclusions Layering need not result in overhead –(on the contrary -- improved code development results in better performance).