Extensible Kernels Mingsheng Hong. OS Kernel Types Monolithic Kernels Microkernels – Flexible (?) – Module Design – Reliable – Secure Extensible Kernels.

Slides:



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

Slide 19-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 19.
CS533 Concepts of Operating Systems Class 14 Virtualization and Exokernels.
Department of Computer Science and Engineering University of Washington Brian N. Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM B. Bershad, S. Savage, P. Pardyak, E. G. Sirer, D. Becker, M. Fiuczynski, C. Chambers,
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
Exokernel: An Opertion System Architecture for Application-Level Resource Management SIGCOMM ’ 96, PDOS-MIT Presented by Ahn Seunghoon Dawson R. Engler,
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, David Becker, Marc.
Extensibility, Safety and Performance in the SPIN Operating System Department of Computer Science and Engineering, University of Washington Brian N. Bershad,
Extensible Kernels: Exokernel and SPIN Presented by Hakim Weatherspoon (Based on slides from Edgar Velázquez-Armendáriz and Ken Birman)
Extensible Kernels Edgar Velázquez-Armendáriz September 24 th 2009.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
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.
Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr.
Extensibility, Safety and Performance in the SPIN Operating System Bershad et al Presentation by norm Slides shamelessly “borrowed” from Stefan Savage’s.
Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
Extensibility, Safety and Performance in the SPIN Operating System Brian Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
1 Extensible Kernels Ken, with slides by Amar Phanishayee.
Extensibility, Safety and Performance in the SPIN Operating System Dave Camarillo.
Microkernels: Mach and L4
Figure 1.1 Interaction between applications and the operating system.
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.
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 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.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
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.
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
CE Operating Systems Lecture 3 Overview of OS functions and structure.
G53SEC 1 Reference Monitors Enforcement of Access Control.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
MIT’s Exokernel Presented by Victoria Barrow Kyle Safford Sean Sommers.
EXTENSIBILITY, SAFETY AND PERFORMANCE IN THE SPIN OPERATING SYSTEM
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 2: OS Structures (Chapter 2.7)
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.
Advanced Operating Systems (CS 202) Extensible Operating Systems Jan, 11, 2016.
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.
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.
The Mach System Sri Ramkrishna.
Extensible OSes Exokernel and SPIN (Lecture 9, cs262a)
Presentation by Omar Abu-Azzah
Operating System Structure
Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr [SOSP’97]
Modern Systems: Extensible KERNELS AND containers
Extensible OSes Exokernel and SPIN Lecture 19, cs262a
Chapter 2: Operating-System Structures
EXOKERNEL Gabriel Beltran John Blackman David Martin Kurt Rohrbacher
Operating Systems Structure
Chapter 2: Operating-System Structures
Advanced Operating Systems (CS 202) Operating System Structure
Presentation transcript:

Extensible Kernels Mingsheng Hong

OS Kernel Types Monolithic Kernels Microkernels – Flexible (?) – Module Design – Reliable – Secure Extensible Kernels – Can be customized (extended, specialized, replaced) More functionality Better performance

Motivations Problems in traditional OS kernels – Implementation cannot be modified LRU as general page replacement strategy – Hide information of machine resources Not always appropriate in achieving high performance – database on top of file system – Provide a unified interface (overly general) Trade-offs for different applications – page table structure

Approaches Exokernel: safely expose machine resources – Higher-level abstractions are implemented in applications – The concept of Library OS – Safety ensured by secure bindings SPIN: use kernel extensions to safely extend/change OS services/implementations – Event-driven model to customize services – Efficiency preserved – Safety ensured by PL facilities

Exokernel: Overview An extension of RISC philosophy Kernel provides minimum services – Hardware resource protection Allocation Revocation Sharing Tracking of ownership – Resource usage arbitration Including an abort protocol LibOS as powerful as traditional OS

Exokernel: OS Component Layout Exokernel

A Motivating Example *This example is borrowed from MIT website

The Reality …

If Exokernel is Used…

Exokernel: Design Principle To separate protection from management – Can protect resources without understanding them When knowledge of resource is required – Can leave decisions to applications by downloading code – Another level of indirection without sacrificing performance

Exokernel: Secure Bindings Why? – Library OSes are untrusted How? – Hardware mechanism TLB entry – Software caching STLB – Downloading application code

Secure Bindings Multiplexing physical memory – Records capabilities: ownership, R/W permissions (authorization at bind time) – Checks capabilities(authentication at access time) – Enables resource sharing (How?)

Secure Bindings via Downloading Code Multiplexing the network – Uses Application-specific Safe Handlers (ASHs) – Performance Eliminate kernel crossings Decouple latency-critical operations from process scheduling – Safety Can be verified and trusted

More on ASHs An ASH can serve as a – Packet filter – Computation unit checksumming – Message initiator – Control initiator

Issues in Resource Revocation Visible deallocation of resource – So that library OS has a chance to react e.g. when physical page “5” is deallocated – But could be less efficient Can combine invisible revocation Library OS can be prepared for such occasions But when application does not cooperate… – Abort Protocol – imperative revocation e.g. cpu time slice Need to leave some resource for each libOS – Guaranteed mapping

Experiment: Aegis & ExOS Aegis: an exokernel on MIPS-based DECstation – Xok: another exokernel for Intel x86 computers ExOS: the corresponding library OS – Virtual memory, IPC are managed at application level – Can be extended Performance compared with: Ultrix

Procedure and System Calls

Protected Control Transfers Suggested reasons (?) – Kernal crossing – TLB flush

ExOS: IPC, VM

ASH: Scalability

Conclusion Securely multiplexes hardware resources, to achieve more flexibility & efficiency – OS primitives – High level abstractions: VM, IPC – Implementation can be customized (libOS)

Some Issues Exokernel – Portability Library OS – Too much code in user space? – Not easy to customize? OSKit, SPIN – Should provide a standard interface? – Security

SPIN: an Extensible OS Uses language features to make a system – Extensible Dynamic linking & later binding – Safe Type safe language – Efficient In kernel space Modula-3 features: memory safe; interfaces

Traditional OSes *This picture is borrowed from Univ. of Washington website

SPIN Structure *This picture is borrowed from Univ. of Washington website

The Protection Model Pointers as capabilities – Types not forgeable – Determined at compile-time => efficient – Externalized when passed across domains An object is safe if – Verified by the compiler – Or asserted so by the kernel (objected implemented in other languages)

The Extension Model Events and handlers event handlers P1 P2 P3 Execution of handlers can be Synchronous/ asynchronous Bounded in time Ordered/unordered predicates

Core Services Services that cannot be safely implemented by extensions Simple functionality Fine grained control

Core Services: Memory Management Manage memory and processor resources – MM interfaces Storage: allocate, deallocate, reclaim Naming : allocate, deallocate Translation: add/remove/examine mapping – Exceptions PageNotPresent BadAddress ProtectionFault – Address space model can be defined on top of the primitives

Core Services: Thread Management Thread Management – Strand interface block/unblock checkpoint/resume – Global and application-specific schedulers – Thread model can be defined on top of the primitives Core services are trusted – Extensions should be fault-isolated

Performance I: Competitors DEC OSF/1: monolithic kernel Mach 3.0: microkernel SPIN: extensible kernel

Performance II: Microbenchmarks IPC Thread management

VM primitives Kernel crossings Overhead in demultiplexing exception (?)

Performance III: Networking Latency and bandwidth Packet forwarding

End-to-End Performance Networked Video System A dilemma in web server buffer management -- hybrid cache policy

Issues in SPIN Scalability of the event/handler model How to prioritize handlers? – Throughput vs. fairness Extensibility limited by interfaces

Conclusion Two methods to make OS more flexible & efficient Both reduce kernel crossings – Exokernel: libOS – SPIN: link extension code to kernel space