Improving IPC by Kernel Design Jochen Liedtke Proceeding of the 14 th ACM Symposium on Operating Systems Principles Asheville, North Carolina 1993.

Slides:



Advertisements
Similar presentations
Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
Advertisements

Threads, SMP, and Microkernels
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Improving IPC by Kernel Design Jochen Liedtke Slides based on a presentation by Rebekah Leslie.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
User-Level Interprocess Communication for Shared Memory Multiprocessors Bershad, B. N., Anderson, T. E., Lazowska, E.D., and Levy, H. M. Presented by Akbar.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Computer Systems/Operating Systems - Class 8
Presented By Srinivas Sundaravaradan. MACH µ-Kernel system based on message passing Over 5000 cycles to transfer a short message Buffering IPC L3 Similar.
1. Overview  Introduction  Motivations  Multikernel Model  Implementation – The Barrelfish  Performance Testing  Conclusion 2.
CS533 Concepts of Operating Systems Class 6 Micro-kernels Mach vs L3 vs L4.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Improving IPC by Kernel Design Jochen Liedtke Presented by Ahmed Badran.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
3.5 Interprocess Communication
Improving IPC by Kernel Design Jochen Liedtke Shane Matthews Portland State University.
Microkernels: Mach and L4
Figure 1.1 Interaction between applications and the operating system.
1 An Architectural View of an OS Inter-process communication Process Scheduling Process Control Subsystem File Subsystem Device Drivers Hardware Control.
Process Concept An operating system executes a variety of programs
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 6 The Performance of Micro- Kernel Based Systems.
The Design of Robust and Efficient Microkernel ManRiX, The Design of Robust and Efficient Microkernel Presented by: Manish Regmi
The Mach System "Operating Systems Concepts, Sixth Edition" by Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presentation by Jonathan Walpole.
Dreams in a Nutshell Steven Sommer Microsoft Research Institute Department of Computing Macquarie University.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Improving IPC by Kernel Design
Paper Review Mach : A New Kernel Foundation For UNIX Development Chan Seok Kang 2013/02/26.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
CS533 Concepts of Operating Systems Jonathan Walpole.
1 Micro-kernel. 2 Key points Microkernel provides minimal abstractions –Address space, threads, IPC Abstractions –… are machine independent –But implementation.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
ICOM Noack Operating Systems - Administrivia Prontuario - Please time-share and ask questions Info is in my homepage amadeus/~noack/ Make bookmark.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
From L3 to seL4 What Have We Learnt in 20 Years of L4 Microkernels? Embedded Lab. Kim Sewoog SOSP 2013.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
The Performance of Microkernel-Based Systems
CS533 Concepts of Operating Systems Jonathan Walpole.
CE Operating Systems Lecture 11 Windows – Object manager and process management.
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Seungweon Park.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Threads G.Anuradha (Reference : William Stallings)
Processes Introduction to Operating Systems: Module 3.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
The Performance of μ-Kernel-Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presenter: Sunita Marathe.
The Mach System Silberschatz et al Presented By Anjana Venkat.
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Tim Hamilton.
Chapter 3 Operating Systems. © 2005 Pearson Addison-Wesley. All rights reserved 3-2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems.
Processes. Process Concept Process Scheduling Operations on Processes Interprocess Communication Communication in Client-Server Systems.
Brian Bershad, Thomas Anderson, Edward Lazowska, and Henry Levy Presented by: Byron Marohn Published: 1991.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
CS533 Concepts of Operating Systems Jonathan Walpole.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
T HE M ULTIKERNEL : A NEW OS ARCHITECTURE FOR SCALABLE MULTICORE SYSTEMS Presented by Mohammed Mustafa Distributed Systems CIS*6000 School of Computer.
WORKING OF SCHEDULER IN OS
Introduction to Operating Systems Concepts
Computer System Structures
Kernel Design & Implementation
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Processes and threads.
The Mach System Sri Ramkrishna.
Process Management Presented By Aditya Gupta Assistant Professor
Improving IPC by Kernel Design
Improving IPC by Kernel Design
Improving IPC by Kernel Design
Operating Systems Structure
Presentation transcript:

Improving IPC by Kernel Design Jochen Liedtke Proceeding of the 14 th ACM Symposium on Operating Systems Principles Asheville, North Carolina 1993

The Performance of u-Kernel-Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Proceedings of the 16 th Symposium on Operating Systems Principles October 1997, pp

Jochen Liedtke (1953 – 2001) 1977 – Diploma in Mathematics from University of Beilefeld – Moved to GMD (German National Research Center). Build L3. Known for overcoming ipc performance hurdles – IBM T.J Watson Research Center. Developed L4, a 12kb second generation microkernel.

The IPC Dilemma IPC is a core paradigm of u-kernel architectures Most IPC implementations perform poorly Really fast message passing systems are needed to run device drivers and other performance critical components at the user-level. Result: programmers circumvent IPC, co-locating device drivers in the kernel and defeating the main purpose of the microkernel architecture

What to Do? Optimize IPC performance above all else! Results: L3 and L4: second-generation micro- kernel based operating systems Many clever optimizations, but no single “silver bullet”

Summary of Techniques Seventeen Total

Standard System Calls (Send/Recv) send ( ); System call, Enter kernel Exit kernel Client (Sender)Server (Receiver) receive ( );System call, Enter kernel Exit kernel send ( ); System call, Enter kernel Exit kernel receive ( ); System call, Enter kernel Exit kernel Client is not Blocked Kernel entered/exited four times per call!

New Call/Response-based System Calls call ( ); System call, Enter kernel Allocate CPU to Server Suspend Re allocate CPU to Client Exit kernel Client (Sender)Server (Receiver) Resume from being suspended Exit kernel reply_and_recv_next ( ); Enter kernel Send Reply Wait for next message handle message Special system calls for RPC-style interaction Kernel entered and exited only twice per call! reply_and_recv_next ( );

Complex Message Structure Batching IPC Combine a sequence of send operations into a single operation by supporting complex messages Benefit: reduces number of sends.

Direct Transfer by Temporary Mapping Naïve message transfer: copy from sender to kernel then from kernel to receiver Optimizing transfer by sharing memory between sender and receiver is not secure L3 supports single-copy transfers by temporarily mapping a communication window into the sender.

Scheduling Conventionally, ipc operations call or reply & receive require scheduling actions: –Delete sending thread from the ready queue. –Insert sending thread into the waiting queue –Delete the receiving thread from the waiting queue. –Insert receiving thread into the ready queue. These operations, together with 4 expected TLB misses will take at least 1.2 us (23%T).

Solution, Lazy Scheduling Don’t bother updating the scheduler queues! Instead, delay the movement of threads among queues until the queues are queried. Why? –A sending thread that blocks will soon unblock again, and maybe nobody will ever notice that it blocked Lazy scheduling is achieved by setting state flags (ready / waiting) in the Thread Control Blocks

Pass Short Messages in Registers Most messages are very short, 8 bytes (plus 8 bytes of sender id) –Eg. ack/error replies from device drivers or hardware initiated interrupt messages. Transfer short messages via cpu registers. Performance gain of 2.4 us or 48%T.

Impact on IPC Performance For an eight byte message, ipc time for L3 is 5.2 us compared to 115 us for Mach, a 22 fold improvement. For large message (4K) a 3 fold improvement is seen.

Relative Importance of Techniques Quantifiable impact of techniques –49% means that that removing that item would increase ipc time by 49%.

OS and Application-Level Performance

OS-Level Performance

Application-Level Performance

Conclusion Use a synergistic approach to improve IPC performance –A thorough understanding of hardware/software interaction is required –no “silver bullet” IPC performance can be improved by a factor of 10 … but even so, a micro-kernel-based OS will not be as fast as an equivalent monolithic OS –L4-based Linux outperforms Mach-based Linux, but not monolithic Linux