The Performance of Microkernel-Based Systems

Slides:



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

Operating System Structures
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.
Department of Computer Science and Engineering University of Washington Brian N. Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
MICRO-KERNELS New Generation Innovation. The contents Traditional OS view & its problems. Micro-kernel : introduction to concept. First generation micro-kernels.
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 Vs Unix Operating Systems Overview Introduction Design Principles Programmer Interface User Interface Process Management Memory Management File.
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-
Threads Irfan Khan Myo Thein What Are Threads ? a light, fine, string like length of material made up of two or more fibers or strands of spun cotton,
CS533 Concepts of Operating Systems Class 6 Micro-kernels Mach vs L3 vs L4.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
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.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
User Level Interprocess Communication for Shared Memory Multiprocessor by Bershad, B.N. Anderson, A.E., Lazowska, E.D., and Levy, H.M.
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.
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
Microkernels: Mach and L4
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
G Robert Grimm New York University Scheduler Activations.
CS533 Concepts of Operating Systems Class 6 The Performance of Micro- Kernel Based Systems.
Extensible Kernels Mingsheng Hong. OS Kernel Types Monolithic Kernels Microkernels – Flexible (?) – Module Design – Reliable – Secure Extensible Kernels.
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.
Stack Management Each process/thread has two stacks  Kernel stack  User stack Stack pointer changes when exiting/entering the kernel Q: Why is this necessary?
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Presentation by Betsy Kavali
Protection and the Kernel: Mode, Space, and Context.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
Paper Review Mach : A New Kernel Foundation For UNIX Development Chan Seok Kang 2013/02/26.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
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.
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.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
“Operating Systems Concepts, Sixth Edition” by Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presented by Karl Matthias Portland State University.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
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.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
The Mach System Abraham Silberschatz, Peter Baer Galvin, Greg Gagne Presentation By: Agnimitra Roy.
Scott Ferguson Section 1
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
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.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
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.
The Performance of Micro-Kernel- Based Systems H. Haertig, M. Hohmuth, J. Liedtke, S. Schoenberg, J. Wolter Presentation by: Tim Hamilton.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
CS533 Concepts of Operating Systems Jonathan Walpole.
MICROKERNELS: MACH AND L4 Hakim Weatherspoon CS
Microkernels: mach and L4
CS 6560: Operating Systems Design
The Mach System Sri Ramkrishna.
Improving IPC by Kernel Design
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Operating Systems Structure
OPERATING SYSTEMS MEMORY MANAGEMENT BY DR.V.R.ELANGOVAN.
Microkernels: mach and L4
Presentation transcript:

The Performance of Microkernel-Based Systems L4Linux

What is a microkernel kernels that only provide address spaces, threads, and IPC kernel does not handle e.g. the file system or interrupts

Mircokernel abstraction level some researchers feel abstraction level is too high kernel should map more directly to hardware some researchers feel abstraction is too low focus on extensibility (Mach)

L4 so called 2nd generation microkernel built from scratch as opposed to a developed from earlier monolithic kernel approaches (e.g. Mach)

L4 essentials threads, address spaces and cross-address-space communication (IPC) other kernel operations e.g. RPC and address-space crossing thread migration are built up from IPC primitives

Address spaces recursive construction granting, mapping, unmapping a page owner can grant or map any of its pages to another address space with the receiver permission. That page is then accessible to both address spaces

Address spaces (cont) only the grant, map, and unmap are implemented in the kernel user-level “pagers” handle page faults

Interrupts, exceptions, and traps all handled at user level interrupts are transformed, by kernel, into IPC messages and sent to appropriate user level thread exceptions and traps are synchronous to associated thread and kernel mirrors them to that thread

Implementation of L4Linux develop L4Linux, a linux “personality” on top of the L4 microkernel due to time restrictions the linux kernel was not fine tuned in L4Linux, so results are only an upper bound on the performance penalty

L4Linux linux 2.0.21 on top of L4 linux kernel is a user level server 100% binary compatible modified versions of shared C library libc.so and libc.a user level “trampoline” exception 14 engineer months and 6500 rewritten lines out of a total of ~340,000

Trampoline 100% binary compatible means that a program statically linked against the native linux library must run, unmodified, on L4Linux the trampoline “bounces” the system-call trap that on native linux went into the kernel back into the modified shared library on L4Linux Microkernel upcalls into user level handler, handler than makes an RPC (read, invokes kernel again) to OS personality to invoke system call

L4Linux (cont) L4 maps the entire initial address space to kernel server single thread in L4, acts as a single virtual processor to the linux server Linux server occupies a small memory region, which utilizes Pentium’s segment feature to protect its TLB entries, so the TLB always has the linux server’s translations (small-address-space optimization)

L4Linux (cont) L4 allows user level processes to disable interrupts, so uniprocessor version of linux did not need modification of critical sections

L4Linux (cont) interrupt threads have a priority above the server itself, so they don’t execute concurrently signals are forwarded to a co-located signal handler inside each user process, since only a thread in the same address space can manipulate another thread’s state

L4Linux (cont) scheduling is mostly done by L4 scheduler Four priority levels: top half interrupts, bottom half interrupts, the linux server, user processes. No priority decay. so L4 interrupts the linux server in the same way the hardware would interrupt a native linux kernel

L4Linux (cont) “user level schedulers can dynamically change priority and time slice of any thread”?

Experiments micro- and macro- benchmarks used to compare native linux and MkLinux (Mach derived variant) to L4Linux linux vs L4Linux demonstrates performance penalty for using microkernel L4Linux vs MkLinux demonstrates influence of mircokernel on overall system including the influence of colocation extensibility experiments functionality specialized for L4Linux

Performance L4Linux, MkLinux and Linux microbenchmarks getpid: L4Linux 2.4 or 3.4 times slower than linux; MkLinux 3.9 or 28 times slower than L4Linux lmbench and hbench: L4Linux 1 to 3 times slower than linux; MkLinux 1 to 32 times slower than L4Linux The two different versions of L4linux vs linux and then two different versions of MkLinux against the faster L4Linux variant.

Performance (cont) L4Linux, MkLinux and Linux macrobenchmarks recompiling linux server: L4Linux 6%-7% slower than linux; MkLinux 10%-20% slower than L4Linux AIM multiuser benchmark suite: job throughput in L4Linux is 7%-8% lower than linux; MkLinux is 30%-52% lower than L4Linux

Conclusions At application level there is a 5%-10% performance penalty for using L4Linux vs bare linux The particular microkernel used matters Colocation it secondary to microkernel implementation

Extensibility “Can we add services outside L4Linux to improve performance by specializing Unix functionality” “Can we improve certain applications by using native microkernel mechanisms in addition to the classical API” “Can we achieve high performance for non-classical, Unix-incompatible systems coexisting with L4Linux”

Pipes and RPC Latency (us) Bandwidth(MB/s) Linux pipe 29 41 L4Linux pipe 46 40 L4Linux trampoline pipe 56 38 MkLinux (user) pipe 722 10 MkLinux (in-kernel) pipe 316 13 L4 pipe 22 47-10 Synchronous L4 RPC 5 65-105 Synchronous mapping RPC 12 2480-2900

Virtual Memory measure user level page fault that maps a page from one address space to another (not available on Unix) measured traps and two different trap, protect, unprotect patterns which performed on average ~4 times faster than native linux

Cache Partitioning User level main-memory manager can coordinate with L4 to allocate specific L2 cache pages to certain processor matrix multiplication example with a four times speed-up of worst case performance

Possible Alternatives Protected Control Transfers Grafting