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

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.
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.
Computer Systems/Operating Systems - Class 8
CS533 Concepts of Operating Systems Class 6 Micro-kernels Mach vs L3 vs L4.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
Operating System Kernels Ken Birman (borrowing some content from Peter Sirokman)
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.
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.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Microkernels: Mach and L4
Figure 1.1 Interaction between applications and the operating system.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
CS533 Concepts of Operating Systems Class 6 The Performance of Micro- Kernel Based Systems.
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.
ThreadsThreads operating systems. ThreadsThreads A Thread, or thread of execution, is the sequence of instructions being executed. A process may have.
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.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
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.
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Seungweon Park.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Advanced Design and System Patterns The Microkernel Pattern.
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
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.
4300 Lines Added 1800 Lines Removed 1500 Lines Modified PER DAY DURING SUSE Lab.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
The Mach System Silberschatz et al Presented By Anjana Venkat.
Managing Processors Jeff Chase Duke University. The story so far: protected CPU mode user mode kernel mode kernel “top half” kernel “bottom half” (interrupt.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
CS533 Concepts of Operating Systems Jonathan Walpole.
Chapter 4 Threads, SMP, and Microkernels Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
MICROKERNELS: MACH AND L4 Hakim Weatherspoon CS
WORKING OF SCHEDULER IN OS
OPERATING SYSTEM CONCEPT AND PRACTISE
Microkernels: mach and L4
CS 6560: Operating Systems Design
The Mach System Sri Ramkrishna.
CS490 Windows Internals Quiz 2 09/27/2013.
Improving IPC by Kernel Design
Lecture 4- Threads, SMP, and Microkernels
Architectural Support for OS
Outline Operating System Organization Operating System Examples
Architectural Support for OS
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: Tim Hamilton

The L4 Micro-Kernel Contains only 13 system calls. 7 of them are for IPC. Uses only 12k of memory Based on two basic concepts: threads and address spaces IPC is one of the most fundamental mechanisms. Moved Paging out of the kernel into user-space.

Address Spaces L4 uses "flexpages“: logical memory ranging from one physical page up to a complete address space. Flexpages can be granted, mapped, and unmapped An invoker can only map and unmap pages that have been mapped into its own address space

Address Spaces (cont.) Address spaces are built and maintained by user-level processes: Pagers. Threads can associate different pagers with themselves. If a page fault occurs, the L4 kernel sends it to the pager associated with the faulting thread.

I/O as Address Space I/O ports treated as address space As address space, can be mapped and unmapped Hardware interrupts are handled by user- level processes. The L4 kernel will send a message via IPC.

Linux to L4 Some portions of Linux are architecture dependant: Interrupts Low-level device drivers (DMA) Methods for interaction with use processes. Switching between kernel contexts Copyin/copyout between kernel and user space Mapping/unmapping for address space System calls

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.

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.

User Processes Each different user process is implemented as a different L4 task: Has it’s 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.

System Calls Three system call interfaces: 1. A modified version of libc.so that uses L4 primitives. 2. A modified version of libc.a 3. 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.

Signalling Each user-level process has an additional thread for signal handling. Main server thread cannot directly manipulate user process stack, so it sends a message for the signal handling thread, telling the user thread to save it’s state and enter Linux

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.

Small Memory Spaces 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 Measures specific system calls to determine basic performance.

Macrobenchmarks First benchmark was to recompile the Linux Server. 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 (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.

Currently in L4 Original L4/x86 microkernel was not portable. Other versions include L4/MIPS, L4/Alpha Rewritten in C++ by University of Karlsruhe, Germany: highly-portable, 64-bit support, called Pistachio. Pistachio now used for nearly all research. Gnu HURD project using Pistachio.