Spin
Summary
What are we searching for?
- thin
- Like a microkernel
- only mechanisms, not policies
- access to resources without border crossing
- flexible
- resource management should be able to be changed to suit particular applications
Approaches to Extensibility
Capability based [Hydra OS]
- kernel mechanisms for resource allocation
- capability based resource access
- resource manager as coarse-grained objects to reduce border crossing overhead
Microkernel-based [Mach from CMU in 90’s]
- focused on extensibility and portability
Spin
- colocation of kernel + extensions
- avoid border crossing
- compiler enforced modularity
- Logical protection domains
- not hardware address spaces
- Dynamic call binding
- flexibility
Logical Protection Domains
Modula-3 safety + encapsulation mechanisms
- type safety
- auto storage management
- objects
- threads
- exception
- generic interfaces
Fine grained protection via capabilities
- hardware resources (e.g. page frame)
- interfaces (e.g. page allocation module)
- collection of interfaces (e.g. entire vm)
Capabilities as language supported pointers
Spin Mechanisms for Protection Domains
Create
- init with object file contents + export names
Resolve
- names between source + target domains
- once resolved, resources sharing at memory speeds
Combine
- to create an aggregate domain
Customized OS with SPIN
Multiple extensions can live concurrently on the same core, and include (or exclude) submodules at will
SPIN Mechanisms for Events
Services can register event handlers on specified envets
Default Core Services in SPIN
SPIN provides interfraces for core services while allowing extensions to dictate implementation
- Memory Management
- Physical address
- allocate
- deallocate
- reclaim
- Virtual address
- allocate
- deallocate
- Translation
- create/destroy as
- add/remove mapping
- Event Handler
- page fault
- access fault
- bad address
- Physical address
- CPU Scheduling
- SPIN Abstraction:
- strand
- unit of schedule
- semantics defined by extension
- strand
- event handler
- block
- unblock
- checkpoint
- resume
- SPIN global scheduler
- interacts with application threads package
- SPIN Abstraction: