Exokernel: An Operating System Architecture for Application Level Resource Management

Similar documents
OS Extensibility: SPIN and Exokernels. Robert Grimm New York University

Extensible Kernels: Exokernel and SPIN

MODERN SYSTEMS: EXTENSIBLE KERNELS AND CONTAINERS

OS Extensibility: Spin, Exo-kernel and L4

CS533 Concepts of Operating Systems. Jonathan Walpole

The Exokernel Or, How I Learned to Stop Worrying and Hate Operating System Abstractions. Dawson Engler, M. Frans Kaashoek, et al

Exokernel Engler, Kaashoek etc. advantage: fault isolation slow (kernel crossings)

Xen and the Art of Virtualization. CSE-291 (Cloud Computing) Fall 2016

SPIN Operating System

Extensibility, Safety, and Performance in the Spin Operating System

MICROKERNELS: MACH AND L4

Falling in Love with EROS (Or Not) Robert Grimm New York University

Virtual Machines Disco and Xen (Lecture 10, cs262a) Ion Stoica & Ali Ghodsi UC Berkeley February 26, 2018

Lec 22: Interrupts. Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University. Announcements

Microkernels. Overview. Required reading: Improving IPC by kernel design

The Performance of µ-kernel-based Systems

Anne Bracy CS 3410 Computer Science Cornell University

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

Computer Science. ! Other approaches:! Special systems designed for extensibility

Processes and More. CSCI 315 Operating Systems Design Department of Computer Science

Anne Bracy CS 3410 Computer Science Cornell University

Process Scheduling Queues

Cute Tricks with Virtual Memory

Predictable Interrupt Management and Scheduling in the Composite Component-based System

Hakim Weatherspoon CS 3410 Computer Science Cornell University

CS533 Concepts of Operating Systems. Jonathan Walpole

OS Agnostic Sandboxing Using Virtual CPUs

G Xen and Nooks. Robert Grimm New York University

COS 318: Operating Systems

Inf2C - Computer Systems Lecture 16 Exceptions and Processor Management

Chapter 9: Virtual-Memory

Operating System Kernels

Initial Evaluation of a User-Level Device Driver Framework

3.1 Introduction. Computers perform operations concurrently

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation

Virtual Memory. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Kernel Support for Paravirtualized Guest OS

Module 1. Introduction:

Lecture 7. Xen and the Art of Virtualization. Paul Braham, Boris Dragovic, Keir Fraser et al. 16 November, Advanced Operating Systems

Introduction to Operating Systems. Chapter Chapter

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

Syscalls, exceptions, and interrupts, oh my!

Real Time and Embedded Systems. by Dr. Lesley Shannon Course Website:

OPERATING SYSTEMS UNIT - 1

Objectives and Functions Convenience. William Stallings Computer Organization and Architecture 7 th Edition. Efficiency

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

Advanced Systems Security: Virtual Machine Systems

Operating System Support

Chapter 5 (Part II) Large and Fast: Exploiting Memory Hierarchy. Baback Izadi Division of Engineering Programs

Advanced Systems Security: Virtual Machine Systems

Exam Guide COMPSCI 386

Distributed Systems Operation System Support

Overview. Thread Packages. Threads The Thread Model (1) The Thread Model (2) The Thread Model (3) Thread Usage (1)

Last time: introduction. Networks and Operating Systems ( ) Chapter 2: Processes. This time. General OS structure. The kernel is a program!

VM and I/O. IO-Lite: A Unified I/O Buffering and Caching System. Vivek S. Pai, Peter Druschel, Willy Zwaenepoel

OS DESIGN PATTERNS II. CS124 Operating Systems Fall , Lecture 4

Chapter 6: Demand Paging

Memory Management Topics. CS 537 Lecture 11 Memory. Virtualizing Resources

Operating Systems. Antônio Augusto Fröhlich LISHA/UFSC. December 20, 2008

Binary Translation 2

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009.

Announcements. Computer System Organization. Roadmap. Major OS Components. Processes. Tevfik Ko!ar. CSC Operating Systems Fall 2009

Lecture 4: Mechanism of process execution. Mythili Vutukuru IIT Bombay

CSC 453 Operating Systems

Extensibility, Safety and Performance in the SPIN Operating System

Distributed File Systems Issues. NFS (Network File System) AFS: Namespace. The Andrew File System (AFS) Operating Systems 11/19/2012 CSC 256/456 1

Chapter 5 B. Large and Fast: Exploiting Memory Hierarchy

Process Description and Control

Lecture 2: September 9

Processes and Threads

Applications, services. Middleware. OS2 Processes, threads, Processes, threads, communication,... communication,... Platform

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives

Review: Hardware user/kernel boundary

6.033 Spring Lecture #6. Monolithic kernels vs. Microkernels Virtual Machines spring 2018 Katrina LaCurts

The benefits and costs of writing a POSIX kernel in a high-level language

Dan Noé University of New Hampshire / VeloBit

Architectural Support for Operating Systems. Jinkyu Jeong ( Computer Systems Laboratory Sungkyunkwan University

Virtual Memory III. Jo, Heeseung

AVM: Application-Level Virtual Memory. Dawson R. Engler Sandeep K. Gupta M. Frans Kaashoek. fengler, skgupta,

Introduction: Context Switch

Virtual Memory. 1 Administrivia. Tom Kelliher, CS 240. May. 1, Announcements. Homework, toolboxes due Friday. Assignment.

Decentralizing UNIX Abstractions in the Exokernel Architecture

User-level Management of Kernel Memory

Xen and the Art of Virtualization

ADRIAN PERRIG & TORSTEN HOEFLER Networks and Operating Systems ( ) Chapter 6: Demand Paging

Xen and the Art of Virtualization. Nikola Gvozdiev Georgian Mihaila

The Kernel Abstraction

Operating system organizaton

Virtual Memory Primitives for User Programs

Operating Systems Structure. Otto J. Anshus

Tessellation: Space-Time Partitioning in a Manycore Client OS

CS-736 Midterm: Beyond Compare (Spring 2008)

Networks and Operating Systems Chapter 11: Introduction to Operating Systems

Fall 2014:: CSE 506:: Section 2 (PhD) Threading. Nima Honarmand (Based on slides by Don Porter and Mike Ferdman)

COS 318: Operating Systems

Native POSIX Thread Library (NPTL) CSE 506 Don Porter

Transcription:

Exokernel: An Operating System Architecture for Application Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O'Tool Jr. M.I.T Laboratory for Computer Science Cambridge, MA 02139, U.S.A Presented by Jennifer Minor

What is a Kernel? Definition from wiktionary.org: The core, center, or essence of an object or system. (computing) The central part of many computer operating systems which manages the system's resources and the communication between hardware and software components. So what is an Exokernel?

A Monolithic Kernel is... All operating system services run in kernel mode. Single address space. High level abstractions given to application. Must support a wide range of applications. Slow to change. System Calls are expensive.

A Microkernel is... Separate mechanism from policy. Only lower level mechanisms are supported in kernel mode. (Address space management, scheduling and basic IPC) Policies are implemented in user level which are easier to change. Kernel must protect servers from each other. Good protection but has to use IPC to communicate.

So an Exokernel is... Similar to microkernel in that only minimum functionality is in the kernel. Unlike the microkernel it exports hardware resources rather than emulating them. Physical resources are safely allocated to the application, where it can be managed. All abstractions are implemented in application level or as part of a library OS that is part of the application address space.

Exokernel Architecture Goal: Separate protection from management. 1. Low level interface: Provide simple and efficient primitives. 2. Multiplex resources: Securely and fine grained. 3. Limit management to protection: Protect without specific usage knowledge of resource. 4. Export hardware resources: Expose hardware and kernel data structures. 5. Notify Application: Event notifications and visible resource revocation.

Exporting Resources Securely 1. Secure Bindings Hardware mechanisms Software caching Downloading application code 2. Visible Resource Revocation Application level guided deallocation Application specific knowledge of state needed to be saved Application notification that resources are scarce 3. Abort Protocol Mechanism for kernel to force ably take back resources. Still notifies application after the fact.

Aegis: an Exokernel Processor Time Slicing Represents CPU as a linear vector partitioned time slices that can be allocated by the application. Timer Interrupts Denote the beginning and end of a time slice to the user level code where scheduler activations can be implemented. Processor Environments Structures that store information needed to deliver events to applications. (Upcalls) STLB A large software TLB is over the hardware TLB and can be used on a cache miss to map address. Guaranteed Mappings Holds application data and code in memory. Also allows each application a small number of pinned virtual addresses. Dynamic Code Generation Creation of executable code at runtime. Used by the network subsystem to download filters for demultiplexing messages. Protected Control Transfers Changes the program counter to callee, donates current time slice to callee's processor environment and switches to the callee's context. User level efficient IPC abstraction can easily be built on top of PCT's.

Event Handler Contexts Include: Aegis: Events Four Types: Exceptions, Interrupts, Protect Control Transfers and Address Translations Program counter to jump to on event. Memory location to save registers. Additional status registers are needed for timer interrupts and tlb misses. What happens on a hardware exception? Aegis saves three scratch registers into the save area. Loads the exception program counter, the last virtual address translation and cause. Performs a indirect jump into an applications specified program counter. Note: After handling the exception the application can resume execution without going back to the kernel. Special event handlers have to be defined for start time slice, end time slice, asynchronous control transfers, and synchronous control transfers.

Aegis: Performance Machine OS Procedure call Syscall (getpid) DEC2100 Ultrix 0.57 32.2 DEC2100 Aegis 0.56 3.2 / 4.7 DEC3100 Ultrix 0.42 33.7 DEC3100 Aegis 0.42 2.9 / 3.5 DEC5000 Ultrix 0.28 21.3 DEC5000 Aegis 0.28 1.6 / 2.3 Why is performance so much better on Aegis? Kernel data structures are not mapped. No need to worry about a interrupted TLB miss. Two paths for system calls, one for calls that require a stack and a second for ones that do.

ExOS: a Library Operating System Implements traditional operating system abstractions at the application level, since it runs in the applications address space. Fault Isolation IPC abstraction Each application runs in it's own address space. Built on top of protected control transfers. Efficient No protection domain crossing to manage resources after they have been allocated. System calls are near procedure call speed. Extensible Policies can be altered at application level. Virtual Memory Using low level hardware abstractions ExOS provides a rudimentary VM system. Remote Communications Downloading code into the kernel allows the demultiplexing of the messages without a context switch.

ExOS: IPC Performance Machine OS pipe pipe' shm lrpc DEC2100 Ultrix 326.0 n/a 187.0 n/a DEC2100 Aegis 30.9 24.8 12.4 13.9 DEC3100 Ultrix 243.0 n/a 139.0 n/a DEC3100 Aegis 22.6 18.6 9.3 10.4 DEC5000 Ultrix 199.0 n/a 118.0 n/a DEC5000 Aegis 14.2 10.7 5.7 6.3 ExOS built a lrpc abstraction on top of the low level protected procedure call interface given by Aegis. Ultrix does not currently have a lrpc implementation to add new functionality it would need to build on top of one of the existing high level abstractions such pipes.

ExOS: VM Performance Machine OS dirty prot1 prot100 unprot100 trap appel1 appel2 DEC2100 Ultrix n/a 51.6 175.0 175.0 240.0 383.0 335.0 DEC2100 Aegis 17.5 32.5 213.0 275.0 13.9 74.4 45.9 DEC3100 Ultrix n/a 39.0 133.0 133.0 185.0 302.0 267.0 DEC3100 Aegis 13.1 24.4 156.0 206.0 10.1 55.0 34.0 DEC5000 Ultrix n/a 32.0 102.0 102.0 161.0 262.0 232.0 DEC5000 Aegis 9.8 16.9 109.0 143.0 4.8 34.0 22.0 Kernel transitions can be eliminated by implementing abstractions at application level. Application level software can implement functionality that is frequently not provided by traditional operating system.

ExOS: Application Specific Safe Handlers 3500 ASH: Untrusted application Roundtrip Latency (microseconds) 3250 3000 2750 2500 2250 2000 1750 1500 1250 1000 750 500 ExOS without ASH ExOS with ASH level message handlers that are downloaded into the kernel, made safe with code inspection and sand boxing. Reduces intermediate copies of message. Can integrate check summing in transfer mechanism. 250 0 1 2 3 4 5 6 7 8 9 10 Number of Processes Low latency message replies Control initiation

Why are Exokernels important? Fixed high level abstractions hurt application performance Fixed high level abstractions hide information Fixed high level abstractions limit the functionality "Because all applications must share the core abstractions, changes to core abstractions occur rarely, if ever. This is perhaps why few good ideas from the last decade of operating systems research have been adopted into widespread use. What operating systems support scheduler activations [3], multiple protection domains within a single address space [10], efficient IPC [29], or efficient and flexible virtual memory primitives [4, 21, 25]?

Exokernel Design Proves: Resources can be securely partitioned with low overhead Low level interfaces and exposed kernel data structure can produce efficient implementation due to simplicity Downloadable application code into the kernel increase performance and responsiveness Library Operating Systems provide extensible and customizable services at application level.

References MIT Exokernel Operating System http://pdos.csail.mit.edu/exo.html Wikipedia: Exokernel http://en.wikipedia.org/wiki/exokernel Wikipedia: Kernel (computer science) http://en.wikipedia.org/wiki/kernel_%28computer_science%29 Wikipedia: MicroKernel http://en.wikipedia.org/wiki/microkernel Wikipedia: Monolithic Kernel http://en.wikipedia.org/wiki/monolithic_kernel Wiktionary: kernel http://en.wiktionary.org/wiki/kernel