g22.3250-001 robert grimm new york university extensibility: spin and exokernels
Post on 19-Dec-2015
216 views
TRANSCRIPT
![Page 1: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/1.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/2.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/3.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/4.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/5.jpg)
Why Is This Hard?
![Page 6: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/6.jpg)
Two Approaches
![Page 7: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/7.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/8.jpg)
The Big Picture
![Page 9: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/9.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/10.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/11.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/12.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/13.jpg)
Performance
It works
![Page 14: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/14.jpg)
Exokernels Approach
Make the application do it!
![Page 15: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/15.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/16.jpg)
The Big Picture
![Page 17: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/17.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/18.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/19.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/20.jpg)
Performance
It works It scales
![Page 21: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/21.jpg)
Issues
SPIN Trusted compiler Resource control
![Page 22: G22.3250-001 Robert Grimm New York University Extensibility: SPIN and exokernels](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/22.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d3a5503460f94a14309/html5/thumbnails/23.jpg)
What Do You Think?