+ All Categories
Home > Documents > Exokernel : An Operating System Architecture for Application-Level Resource Management

Exokernel : An Operating System Architecture for Application-Level Resource Management

Date post: 25-Feb-2016
Category:
Upload: keon
View: 57 times
Download: 7 times
Share this document with a friend
Description:
Exokernel : An Operating System Architecture for Application-Level Resource Management. Dawson Engler , Frans Kaashoek , James O’Toole MIT Laboratory for Computer Science. Function of Traditional Kernel. Provides abstraction(s) of the hardware Processes Virtual Memory File System - PowerPoint PPT Presentation
Popular Tags:
30
Exokernel: An Operating System Architecture for Application- Level Resource Management Dawson Engler, Frans Kaashoek, James O’Toole MIT Laboratory for Computer Science
Transcript
Page 1: Exokernel : An Operating System Architecture for Application-Level Resource Management

Exokernel: An Operating System Architecture for Application-Level Resource Management

Dawson Engler, Frans Kaashoek, James O’Toole

MIT Laboratory for Computer Science

Page 2: Exokernel : An Operating System Architecture for Application-Level Resource Management

Function of Traditional Kernel

• Provides abstraction(s) of the hardware– Processes– Virtual Memory– File System

• Provides Protection– Hardware– Kernel Itself– Users From Each Other

Page 3: Exokernel : An Operating System Architecture for Application-Level Resource Management

Motivation: A Database

• I/O Abstraction: Cooked I/O – Operating System buffers I/O

• Database Requirement– Cannot tell a Database user that transaction has

committed until log pages have hit the surface of the disk

– Database may need to sequence writes– Database better at predicting future I/O

Page 4: Exokernel : An Operating System Architecture for Application-Level Resource Management
Page 5: Exokernel : An Operating System Architecture for Application-Level Resource Management

The Ever Shrinking Kernel

•Linux Windows –VM,FS..• MicroKernels – Fewer Abstractions: rm FS– Mach– L4

• Virtual Machines (VMM is between OS and hardware) -- Virtualization– DISCO– Xen

• ExoKernel -- Multiplexing– Aegis– XOK

Page 6: Exokernel : An Operating System Architecture for Application-Level Resource Management

Exokernel Architecture

Request Revoke

Environments

Page 7: Exokernel : An Operating System Architecture for Application-Level Resource Management

Securely Expose Hardware

• Hardware:– Disks, Physical Memory, TLB, Frame Buffer, Network Access

• Less Tangible Resources:– CPU Time Slices– Interrupts, Exceptions, Cross Domain Calls– DMA – Privileged Instructions

• Exokernel Exports (readonly):– Freelists, cached TLB entries, disk arm positions

Page 8: Exokernel : An Operating System Architecture for Application-Level Resource Management

Exokernel Functions

• Resource Allocation (Inter-environment)– Grant (or not) Resource Requests (Policy <- SysAd)– Process Release (Dealloc) Requests– Revoke Resources• Visible Revocation (May get to chose which to free)• Abort • Note: Usually some resources exempt: page table mem

– Track Resource Ownership• Guard all resource usage or binding points

Page 9: Exokernel : An Operating System Architecture for Application-Level Resource Management

Resource Allocation

• Allocation (almost always explicit)– Alloc system call

• Deallocation– Dealloc System Call– Visible Revocation

• E.g.: Loss of the CPU when time slices expires:– Library OS must save required processor state

– Abort Protocol • Break all existing secure bindings• Library OS gets a Repossession Exception – includes a

Repossession Vector

Page 10: Exokernel : An Operating System Architecture for Application-Level Resource Management

Secure Bindings

• Break up protection into bind and access• Can be implemented in:– Hardware• TLB• Frame Buffer Ownership Tag

– Software• STLB

– Downloading Code into ExoKernel• Dynamic Packet Filter

Page 11: Exokernel : An Operating System Architecture for Application-Level Resource Management

Examples

• Physical Page– Bind: Get Exokernel to Load Mapping into TLB

• Page allocation– Exokernel grants self-authenticating capability (R/W)– LibOS stores capability in Page Table– Passes Capability, Mapping on TLB write request

– Access: LibOS/Application code uses TLB• Network Access– Bind: Download DPF (Dynamic Packet Filter)– Access: Exokernel Runs DPF on every incoming pkt

• Sends packets to correct Environment

Page 12: Exokernel : An Operating System Architecture for Application-Level Resource Management

0 1 2 3 4 5

2 5freelist

RW

2 5freelist

R only

Virtual Physical CAP

TLB

v

STLB

ExoKernel

Library OS

MIPsHardware

Miss

17 2

Check

Req Alloc 2 2

m = malloc (3000);

emacsstrcpy(m, “The Ever Shrinking Kernel”);

. . .

Page 13: Exokernel : An Operating System Architecture for Application-Level Resource Management

Downloading Code• Advantages:

– Avoid Kernel Crossing– Executed when environment is not scheduled

• Allowed because execution time is bounded

• Specification– High Level Language

• Individual DPF code can be merged• Safety by Language

– C• Application Specific Handlers

– Dynamic Message Vectoring– Message Initiation

• Protection: SFI (Sandboxing), Infinite Loop??

Page 14: Exokernel : An Operating System Architecture for Application-Level Resource Management

TLB Miss in Aegis

1. Aegis checks if mapping is in STLB. If so, load into TLB.2. If the virtual address is one of the pinned pages, Aegis

loads the mapping into the TLB.3. Environment checks its page tables for segmentation

fault. If not, use page tables to get physical page and associated capability.

4. Aegis checks the capability. If valid, loads mapping into TLB.

5. Control returned to the environment.

Page 15: Exokernel : An Operating System Architecture for Application-Level Resource Management

Protected Control Transfer

• Two Properties Use Registers to Pass Msg– Operation is Atomic– No overwrite of environment-visible registers

• Acall– Donate remainder of Current Timeslice

• Scall– Donate all timeslices

Page 16: Exokernel : An Operating System Architecture for Application-Level Resource Management

Micro benchmarks

Page 17: Exokernel : An Operating System Architecture for Application-Level Resource Management

IPC Performance ExOS vs. Ultrix

Page 18: Exokernel : An Operating System Architecture for Application-Level Resource Management

Performance Summary

• Microbenchmarks: 10X• Cheetah web server (XOK) 8X

Page 19: Exokernel : An Operating System Architecture for Application-Level Resource Management

Persistent Storage

• Disk Block Shadowing• Disk Block tag• Low level metadata language• Untrusted Deterministic Function

Page 20: Exokernel : An Operating System Architecture for Application-Level Resource Management
Page 21: Exokernel : An Operating System Architecture for Application-Level Resource Management

Persistent storage

ExOSLibrary OS

XOK

Disk

emacsPhD

Thesis

crash

ExOSLibrary OS

Page 22: Exokernel : An Operating System Architecture for Application-Level Resource Management

Conclusions

• Microbenchmarks and #Kernel Crossings not critical

• Power (E.g. downloaded code) is critical factor• Top Down vs. Bottom Up• Encourages Innovation– Writing an OS is like writing a compiler– Operating System is Untrusted– Untrusted Code Evolves Faster than Trusted

Page 23: Exokernel : An Operating System Architecture for Application-Level Resource Management

… and Caveats

• Hardware Specific: MIPs vs. 486• Persistent Storage is Complex• MultiCPU and scaleability??• Are all of the DISCO tricks available here??

Page 24: Exokernel : An Operating System Architecture for Application-Level Resource Management

Additional References

• Application Performance and Flexibility on Exokernel Systems, Frans Kaashoek, Dawson Engler, Gregory Ganger et al

• Pdos.csail.mit.edu/exo/exo-slides/sld001.htm

Page 25: Exokernel : An Operating System Architecture for Application-Level Resource Management
Page 26: Exokernel : An Operating System Architecture for Application-Level Resource Management
Page 27: Exokernel : An Operating System Architecture for Application-Level Resource Management
Page 28: Exokernel : An Operating System Architecture for Application-Level Resource Management
Page 29: Exokernel : An Operating System Architecture for Application-Level Resource Management
Page 30: Exokernel : An Operating System Architecture for Application-Level Resource Management

Overriding Abstractions

• OS Extensions• How to override generic abstractions

implemented in protected kernel, with better application specific abstractions in user space

• Even if possible, won’t be efficient


Recommended