Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr [SOSP’97]

Slides:



Advertisements
Similar presentations
Northwestern University 2007 Winter – EECS 443 Advanced Operating Systems Exokernel: An Operating System Architecture for Application-Level Resource Management.
Advertisements

Threads, SMP, and Microkernels
MICRO-KERNELS New Generation Innovation. The contents Traditional OS view & its problems. Micro-kernel : introduction to concept. First generation micro-kernels.
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Exokernel: An Opertion System Architecture for Application-Level Resource Management SIGCOMM ’ 96, PDOS-MIT Presented by Ahn Seunghoon Dawson R. Engler,
Extensible Kernels Edgar Velázquez-Armendáriz September 24 th 2009.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
CS533 Concepts of Operating Systems Class 20 Summary.
Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
Scheduler Activations Effective Kernel Support for the User-Level Management of Parallelism.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
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.
Dawson Engler, Frans Kaashoek, James O’Toole
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Extensible Kernels Mingsheng Hong. OS Kernel Types Monolithic Kernels Microkernels – Flexible (?) – Module Design – Reliable – Secure Extensible Kernels.
CS533 Concepts of OS Class 16 ExoKernel by Constantia Tryman.
1 Extensible Kernels Amar Phanishayee. 2 Traditional OS services – Management and Protection Provides a set of abstractions Processes, Threads, Virtual.
M. Frans Kaashoek, Dawson R. Engler, Gregory R. Ganger, Hector M. Bricefio, Russell Hunt, David Mazikres, Thomas Pinckney, Robert Grimm, John Jannotti.
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?
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Protection and the Kernel: Mode, Space, and Context.
Operating System Architectures
APPLICATION PERFORMANCE AND FLEXIBILITY ON EXOKERNEL SYSTEMS M. F. Kaashoek, D. R. Engler, G. R. Ganger H. M. Briceño, R. Hunt, D. Mazières, T. Pinckney,
Paper by Engler, Kaashoek, O’Toole Presentation by Charles Haiber.
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.
Exokernel: An Operating System Architecture for Application-Level Resource Management" by Dawson R. Engler, M. Frans Kaashoek, and James O'Toole Jr. Chris.
The Performance of Microkernel-Based Systems
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.
MIT’s Exokernel Presented by Victoria Barrow Kyle Safford Sean Sommers.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
4-Dec-15CSE 60641: Operating Systems1 -Exokernel: an operating system architecture for application-level resource management. Dawson R. Engler, M. Frans.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
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.
Overview of the MIT Exokernel Operating System James Madison University CS 450 Abzug MWF 10:10-11:00 12/2/02 Steven Petzinger Billy Lehner.
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.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Advanced Operating Systems (CS 202) Extensible Operating Systems Jan, 11, 2016.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
CS533 Concepts of Operating Systems Jonathan Walpole.
Advanced Operating Systems (CS 202) Extensible Operating Systems (II) Jan, 13, 2016.
Exokernel: An Operating System Architecture for Application-Level Resource Management By Dawson R. Engler, M. Frans Kaashoek, James O’Toole Jr. Presented.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Exokernel Operating System: An Introduction Liming Shu COSC 513, Summer 2002.
Exokernel: An Operating System Architecture for Application-Level Resource Management by Dawson R. Engler, M. Frans Kaashoek, and James O'Toole Jr. Presented.
Introduction to Operating Systems Concepts
Kernel Design & Implementation
CS 6560: Operating Systems Design
The Mach System Sri Ramkrishna.
Extensible OSes Exokernel and SPIN (Lecture 9, cs262a)
CASE STUDY 1: Linux and Android
KERNEL ARCHITECTURE.
Memory Protection: Kernel and User Address Spaces
Modern Systems: Extensible KERNELS AND containers
Multithreaded Programming
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
Prof. Leonardo Mostarda University of Camerino
EXOKERNEL Gabriel Beltran John Blackman David Martin Kurt Rohrbacher
Presented by: SHILPI AGARWAL
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Operating Systems Structure
Presentation transcript:

Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr [SOSP’97] Hello everyone, my name is HyunJong, often called Joseph and I’m going to present Exokernel today. The paper was appeared in SOSP 1997 and had a major impact on OS design. Cited more than 1400 times! Presented by HyunJong (Joseph) Lee

Background Tanenbaum-Torvalds debate in 1992 Andrew S. Tanenbaum: Before delving into details, I would like to share a background about the war between micro and monolithic kernel forks. The famous example is Tanenbaum Torvalds debate in 1992, held at Usenet discussion group comp.os.minix Andrew Tanenbaum is an initial contributor to micro kernel named Minix. In January 1992, he posted the first criticism toward Linux kernel with a title “Linux is obsolete” and saying that “a giant step back into the 1970s”. A day later, Linus Torvalds, the founder of Linux kernel, responded, pointing out the inherent flaw in microkernel design such as lack of multithreading. Even after a quarter century, the war is still going on as micro kernel design such as Xen, Mac OS X versus monolithic kernel design such as Unix-like, KVM, and Android forks are still competing one another. We will visit this quarter century-long war later at discussion. Andrew S. Tanenbaum: “Linux is obsolete” Linus G. Torvalds: “look at who makes money off minix, and who gives linux out for free”

Traditional Approach Central resource-management Kernel exposes minimal H/W abstractions Fixed high-level abstractions Let’s get back to Exokernel. The motivation behind traditional approach to build a system in monolithic kernel includes central resource management, minimal exposition of hardware abstractions and fixed high-level abstractions like File. What the authors trying to claim is these kernel design comes at high overhead.

Problem w/ high-level abst. Hurts app. performance no single fixed abstraction is good for all apps. Hides information from OS lack of app. specific resource-management Limits functionality of apps. use only fixed high-level abstraction The authors of paper argues that problem with high-level abstraction from traditional approach is that It hurts application performance because no single fixed abstraction is suitable for all kinds of apps It hides information from OS. Examples are low-level exception like page fault, timer interrupt, access to row I/O devices. This makes hard to implement application’s own resource management scheme. For instance, thread user library lack of system integration, doesn't know, if there is a page fault Finally, It limits functionality of applications. In other words, fixed abstractions are only interface apps can use, and thus, change to these abstractions cannot be done.

Apps know better about their goal! Motivation Central resource management Move to untrusted app level Kernel exposes minimal abstractions of H/Ws Securely multiplex H/W to upper layer Fixed high-level abstractions Flexible low-level interfaces Apps know better about their goal! The paper argues for moving resource management to untrusted application level, securely multiplexing hardware to above kernel level, providing flexible low-level interfaces. All these argument comes from the assumption that applications know better about their goal than underlying system!

Goal OS gives as much control as possible to apps. separate protection from management low-level interfaces multiplex H/Ws The goal of Exokernel is to give as much control as possible to applications in order to separate protection from resource management expose low-level interfaces and multiplex hardwares.

libOS no need to multiplex a resource multiple concurrent libOSes simpler & specialized implementation out-of-kernel multiple concurrent libOSes protection provided by Aegis [discussed later] less number of kernel crossings b/c OS runs in application’s address space before delving into exokernel design, it is important to know the benefit of moving many things out of kernel That is, the beauty of exokernel design is library operating system that does not have to multiplex a resource among competing applications that supports multiple OSes simultaneously like today’s virtual machines and because libOS itself runs in application’s address space, there is less number of kernel crossings which considered to be high overhead in OS design

Exokernel Design Securely expose H/Ws Secure bindings Expose allocation, names, and revocation Secure bindings h/w multiplexing, s/w caching, downloading app. code Visible revocation allows libOSes to participate in resource revocation Abort protocol break bindings of uncooperative libOSes Exokernel’s design is centered around four bullet points 1. securely expose hardwares by exposing allocation, names and revocation of hardwares 2. use secure bindings to multiplex hardware, software caching and downloading application code 3. by visible revocation, allow libOSes to participate in resource revocation 4. break bindings of uncooperative libOSes using abort protocol. We will revisit abort protocol in discussion later.

Exokernel Design As you can see from the diagram, hardwares are exposed via secure bindings to protect them. All functionality other than protection is moved to application level. This allows flexible application-specific implementation.

Evaluation Aegis: exokernel ExOSs: library operating system System calls & Exceptions Protected control transfers Address translations & DPF ExOSs: library operating system IPC abstractions App-level virtual memory App-specific Safe Handlers (ASH) Extensibility in RPC, Page-Table structures, Schedulers Let’s move the gear to evaluation. In the paper, Aegis and ExOS are evaluated. - Aegis is an exokernel that exports the processor, physical memory, TLB, exceptions, interrupts and network interfaces. * We are going to cover a overhead in system calls and exceptions. * Details in protected control transfers, address translations and DPF are detailed in the paper. - ExOS is a library operating system that implements processes, virtual memory, user-level exceptions, various interprocess abstractions (IPC) and a few network protocols. * We are going to cover IPC abstractions, application-level virtual memory and stride scheduling. * Details in application specific safe handlers (ASH) and other extensibility examples can be found in the paper. Spoiler: there is only few papers that say their system is bad in evaluation!

Aegis Base costs Exception costs using stack vs. not [getpid()] no kernel intervention Null procedure and system call costs in micorseconds * Aegis compares with the state of art monolithic kernel, Ultrix. - Base cost with null procedure is shown to prove that Aegis’s scheduling flexibility does not add overhead to base operations (first columns) - The system calls that require a stack is an order of magnitude faster in Aegis, because Aegis does not map its data structure and does not have page tables, no TLB misses due to kernel TLB faults. * Also, Aegis dispatches all hardware exceptions to application by - saving scratch registers into save area using physical addresses - loading exception program counter, last virtual address where translation failed that is root of the exception - jumping to application specified PC where execution resumes. Results in two orders of magnitude faster than Ultrix and evenly distributed cost. Aegis vs. Ultrix exception handling times in microseconds

ExOS manages fundamental OS abstractions at application-level ExOS manages fundamental operating system abstractions such as virtual memory and process at application level. The measured latency in the table is from the latency of pingponging between two processes using different methods. - pipe uses sending a word-sized message. - shm uses a shared counter (Aegis’s Yield syscall vs. Ultrix’s signal) - Light RPC is built on top of Aegis’s protected control transfer. The main reason in performance improvement is “using flexible low-level abstractions”. In other words, existing systems such as Ultrix must emulate new primitives on top of existing ones due to fixed high-level abstractions. ExOS manages fundamental OS abstractions at application-level

ExOS contd. Even with two limitations, ExOS offers richer interface to apps to implement app-specific functionality There are two main limitations: no swapping and page-tables as a linear vector The overall performance of ExOS in each of virtual memory operation is better, of course. One thing to point out is that prot100 and unprot100 (read and remove read-protected 100 pages). The authors note that because ExOS requires access to two data structures, one from Aegis’s STLB and ExOS’s page table, it shows poor performance.

Extensibility Stride scheduler example of Aegis’s use of fine-grained control to enhance modularity of app. design Stride scheduler is implemented on ExOS. Just creates three processes that increment counters in shared memory. The result shows that it’s close to ideal case. Aegis includes yield primitives to donate the remainder of a process’ current quanta to another process. This highlights extensibility in exokernel even with a process scheduler, that is considered as hard to be application specific!

Conclusion Exokernel decouples protection from central resource management in kernel. Exokernel exposes primitives to apps. Exokernel achieves higher performance. READ…!

Types of kernel I would like to close this presentation by going over types of kernel. There are broadly three types of kernel: 1. Traditional monolithic kernel 2. “new” micro kernel that moves as much out of kernel space 3. Hybrid kernel that is mostly used today

Discussion Topics Is Exokernel considered as a microkernel? Performance improvement in exchange of security & burden of implementation? Hybrid-kernels w/ loadable module support? The table is a summary of what you guys wrote about weakness. Bring up Xen & Android example Bring up Node.js (just import whatever you want) crash incidence Bring up that only memory management and process creation cannot be done at module level. Implementation cost 12 Too low-level interface 5 Portability 4 Security concern CPU/resource scheduling

Happy Ending Coming back to background, Linus and Tanenbaum got a happy ending.

Except Prof. Engler Except Prof. Engler, who developed exokernel