g22.3250-001 robert grimm new york university extensibility: spin and exokernels

23
G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Post on 19-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

G22.3250-001

Robert GrimmNew York University

Extensibility:SPIN and exokernels

Page 2: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

The Three Questions

What is the problem? What is new or different? What are the contributions and limitations?

Page 3: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

OS Abstraction Barrier

Fixed high-level abstractions Hurt application performance Hide information Limit functionality

Examples Buffer cache management Persistent storage

Page 4: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Goals

Extensibility Applications introduce specialized services

Safety Kernel, applications, services are protected

Performance Extensibility and safety have low cost

Page 5: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Why Is This Hard?

Page 6: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Two Approaches

Page 7: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

SPIN Approach

Put extension code in the kernel Cheap communication

Use language protection features Static safety

Dynamically impose on any service Fine-grained extensibility

Page 8: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

The Big Picture

Page 9: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Modula-3

Type-safe programming language Interfaces Garbage collection Other features

Objects, generic interfaces, threads, exceptions

Most of kernel written in Modula-3 Extensions must be written in Modula-3 User-space applications written in any language

Page 10: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Safety

Capabilities Simply a pointer

Can we pass capabilities to user-land?

Protection domains Language-level Limit visibility of names Enforced at dynamic link time

Page 11: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Extensibility

Extension model Events Event handlers Guards

Mechanism Event dispatcher Common case: procedure call

Page 12: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Core Services

Memory management Physical addresses Virtual addresses Translations

Thread management Signals to scheduler

Block, unblock

Signals to thread manager Checkpoint, resume

Page 13: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Performance

It works

Page 14: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Exokernels Approach

Make the application do it!

Page 15: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Exokernels Approach (again)

Separate protection and management Expose allocation Expose names Expose revocation Expose information

Page 16: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

The Big Picture

Page 17: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

At The Core

Processor time slices Processor environments

Hardware exceptions (Aegis, Xok) Timer interrupts (Aegis, Xok) Protected entries (Aegis, Xok) Addressing

Aegis: Guaranteed mappings, applications notified of TLB misses

Xok: Hardware page tables, applications specify mappings

Hierarchical capabilities (Xok only)

Book keeping

Aegis: MIPS-based DECstationsXok: x86-based PCs

Page 18: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Case Study: The Disk

Problem How to store meta-data?

Ownership of disk blocks

Failed approaches Simple capabilities Self-descriptive meta-data Template-based descriptions

Page 19: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

The Disk (cont.)

Untrusted deterministic functions Programmatic templates

Shared data Buffer cache registry

Ordered disk writes Ensure consistency after crash

Page 20: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Performance

It works It scales

Page 21: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Issues

SPIN Trusted compiler Resource control

Page 22: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

Issues (cont.)

Exokernels Extension model Downloaded code

Wakeup predicates

Dynamic packet filters

Application-specific handlers

Untrusted deterministic functions

Complexity of disk management

Page 23: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels

What Do You Think?