The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Seungweon Park.

Slides:



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

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.
Outline of the Paper Introduction. Overview Of L4. Design and Implementation Of Linux Server. Evaluating Compatibility Performance. Evaluating Extensibility.
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 The Performance of µ-Kernel-Based Systems H. Härtig, M. Hohmuth, J. Liedtke, S. Schönberg and J. Wolter.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Chapter 4: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads.
Presented By Srinivas Sundaravaradan. MACH µ-Kernel system based on message passing Over 5000 cycles to transfer a short message Buffering IPC L3 Similar.
CS533 Concepts of Operating Systems Class 6 Micro-kernels Mach vs L3 vs L4.
Virtual Memory Virtual Memory Management in Mach Labels and Event Processes in Asbestos Ingar Arntzen.
Operating System Kernels Ken Birman (borrowing some content from Peter Sirokman)
Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr.
Operating System Kernels Peter Sirokman. Summary of First Paper The Performance of µ-Kernel-Based Systems (Hartig et al. 16th SOSP, Oct 1997) Evaluates.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
Scheduler Activations Effective Kernel Support for the User-Level Management of Parallelism.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Improving IPC by Kernel Design Jochen Liedtke Proceeding of the 14 th ACM Symposium on Operating Systems Principles Asheville, North Carolina 1993.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
3.5 Interprocess Communication
Improving IPC by Kernel Design Jochen Liedtke Shane Matthews Portland State University.
Microkernels: Mach and L4
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
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.
CS533 Concepts of OS Class 16 ExoKernel by Constantia Tryman.
Wind River VxWorks Presentation
Presentation by Betsy Kavali
Chapter 4 Threads, SMP, and Microkernels Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
CS533 Concepts of Operating Systems Jonathan Walpole.
Extensibility, Safety and Performance in the SPIN Operating System Ashwini Kulkarni Operating Systems Winter 2006.
1 Micro-kernel. 2 Key points Microkernel provides minimal abstractions –Address space, threads, IPC Abstractions –… are machine independent –But implementation.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
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 3 Overview of OS functions and structure.
Processes Introduction to Operating Systems: Module 3.
The Mach System Abraham Silberschatz, Peter Baer Galvin, Greg Gagne Presentation By: Agnimitra Roy.
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
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 Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presented by: Jee Vang.
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
The Mach System Silberschatz et al Presented By Anjana Venkat.
Full and Para Virtualization
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Tim Hamilton.
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
CS533 Concepts of Operating Systems Jonathan Walpole.
Low Overhead Real-Time Computing General Purpose OS’s can be highly unpredictable Linux response times seen in the 100’s of milliseconds Work around this.
MICROKERNELS: MACH AND L4 Hakim Weatherspoon CS
Introduction to Operating Systems Concepts
Kernel Design & Implementation
Microkernels: mach and L4
CS 6560: Operating Systems Design
The Mach System Sri Ramkrishna.
Improving IPC by Kernel Design
Improving IPC by Kernel Design
Translation Buffers (TLB’s)
Translation Buffers (TLB’s)
Outline Operating System Organization Operating System Examples
Translation Buffers (TLBs)
Operating Systems Structure
Microkernels: mach and L4
Presentation transcript:

The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Seungweon Park

Introduction μ-kernels have reputation for being too slow, inflexible Can 2nd generation μ-kernel (L4) overcome limitations? Experiment: – Port Linux to run on L4 (Mach 3.0) – Compared to native Linux, MkLinux (Linux on 1st gen Mach derived μ-kernel)

Introduction (cont.) Test speed of standard OS personality on top of fast μ-kernel: Linux implemented on L4 Test extensibility of system: – pipe-based communication implemented directly on μ- kernel – mapping-related OS extensions implemented as user tasks – user-level real-time memory management implemented Test if L4 abstractions independent of platform

L4 Essentials Based on threads and address spaces Recursive construction of address spaces by user- level servers – Initial address space σ 0 represents physical memory – Basic operations: granting, mapping, and unmapping. Owner of address space can grant or map page to another address space All address spaces maintained by user-level servers (pagers)

L 4 Linux – Design & Implementation Fully binary compliant with Linux/X86 Restricted modifications to architecture- dependent part of Linux No Linux-specific modifications to L4 kernel

L 4 Linux – Design & Implementation Address Spaces – Initial address space σ 0 represents physical memory – Basic operations: granting, mapping, and unmapping. – L4 uses “flexpages”: logical memory ranging from one physical page up to a complete address space. – An invoker can only map and unmap pages that have been mapped into its own address space

L 4 Linux – Design & Implementation

Address Spaces (cont.) – I/O ports are parts of address spaces. – Hardware interrupts are handled by user-level processes. The L4 kernel will send a message via IPC.

L 4 Linux – Design & Implementation The Linux server – L4Linux will use a single-server approach. – A single Linux server will run on top of L4, multiplexing a single thread for system calls and page faults. – The Linux server maps physical memory into its address space, and acts as the pager for any user processes it creates. – The Server cannot directly access the hardware page tables, and must maintain logical pages in its own address space.

L 4 Linux – Design & Implementation Interrupt Handling – All interrupt handlers are mapped to messages. – The Linux server contains threads that do nothing but wait for interrupt messages. – Interrupt threads have a higher priority than the main thread.

L 4 Linux – Design & Implementation User Processes – Each different user process is implemented as a different L4 task: Has its own address space and threads. – The Linux Server is the pager for these processes. Any fault by the user-level processes is sent by RPC from the L4 kernel to the Server.

L 4 Linux – Design & Implementation System Calls – Three system call interfaces: A modified version of libc.so that uses L4 primitives. A modified version of libc.a A user-level exception handler (trampoline) calls the corresponding routine in the modified shared library. – The first two options are the fastest. The third is maintained for compatibility.

L 4 Linux – Design & Implementation Signalling – Each user-level process has an additional thread for signal handling. – Main server thread sends a message for the signal handling thread, telling the user thread to save it’s state and enter Linux

L 4 Linux – Design & Implementation Scheduling – All thread scheduling is down by the L4 kernel – The Linux server’s schedule() routine is only used for multiplexing it’s single thread. – After each system call, if no other system call is pending, it simply resumes the user process thread and sleeps.

L 4 Linux – Design & Implementation Tagged TLB & Small Space. – In order to reduce TLB conflicts, L4Linux has a special library to customize code and data for communicating with the Linux Server – The emulation library and signal thread are mapped close to the application, instead of default high-memory area.

Performance What is the penalty of using L4Linux? Compare L4Linux to native Linux Does the performance of the underlying micro-kernel matter? Compare L4Linux to MkLinux Does co-location improve performance? Compare L4Linux to an in-kernel version of MkLinux

Microbenchmarks measured system call overhead on shortest system call “getpid()”

Microbenchmarks (cont.) Measures specific system calls to determine basic performance.

Macrobenchmarks measured time to recompile Linux server

Macrobenchmarks (cont.) Next use a commercial test suite to simulate a system under full load.

Performance Analysis L4Linux is, on average 8.3% slower than native Linux. Only 6.8% slower at maximum load. MkLinux: 49% average, 60% at maximum. Co-located MkLinux: 29% average, 37% at maximum.

Extensibility Performance A micro-kernel must provide more than just the features of the OS running on top of it. Specialization – improved implementation of Os functionality Extensibility – permits implementation of new services that cannot be easily added to a conventional OS.

Pipes and RPC First five (1) use the standard pipe mechanism of the Linux kernel. (2) Is asynchronous and uses only L4 IPC primitives. Emulates POSIX standard pipes, without signalling. Added thread for buffering and cross-address-space communication. (3) Is synchronous and uses blocking IPC without buffering data. (4) Maps pages into the receiver’s address space.

Virtual Memory Operations The “Fault” operation is an example of extensibility – measures the time to resolve a page fault by a user-defined pager in a separate address space. “Trap” – Latency between a write operation to a protected page, and the invocation of related exception handler. “Appel1” – Time to access a random protected page. The fault handler unprotects the page, protects some other page, and resumes. “Appel2” – Time to access a random protected page where the fault handler only unprotects the page and resumes.

Conclusion Using the L4 micro-kernel imposes a 5-10% slowdown to native Linux. Much faster than previous micro-kernels. Further optimizations such as co-locating the Linux Server, and providing extensibility could improve L4Linux even further.

Q&A