SPIN, Exokernel, Microkernel Flashcards
What are the overall characteristics of a microkernel?
- Provides abstractions to resources/OS core services
- Each service is its own address space
- Microkernel serves as the middleman between services and OS services
What are the downsides of microkernels?
- Potential for performance loss due to extra border crossings from services to OS service
- High communication overhead
Goals of extensibility
To be able to be:
- Thin like microkernel
- Access to resources without border crossings
- Flexible
Previous approaches to extensibility
- HydraOS
- Microkernels
- Cross domain communication
- Little languages
What was SPIN’s approach to extensibility?
Use language features to extend OS
Language used was Modula-3
What are the characteristics of SPIN?
- Kernel is minimal, but extendable (avoids border crossings)
- Compiler enforces modularity
- Logical protection domains (not hardware address space)
- Dynamic call binding (ensures flexibility)
How is SPIN customizable?
- Defines interfaces to subsystems
- Just need to specify: start, create, resolve, combine
What are SPIN extensions?
- Pieces of code that reside above SPIN
- Definitions of interfaces to subsystems
- Customizable
What are program discontinuities?
- Page fault
- External interrupts
- System calls
- Exceptions
How does SPIN handle program discontinuities?
Passes program discontinuities to library OS as events through event handlers/procedure calls
Doing so avoid context switches
What do core services do in SPIN?
- Provide access to hardware mechanisms
- Does involve stepping outside the language to control hardware resources
What are core services in SPIN?
- Memory management (physical, virtual, translation)
- CPU scheduling (app level, processor level, global)
What sorts of services does SPIN require definition for for memory management?
- Physical: allocate, deallocate, reclaim
- Virtual: allocate, deallocate
- Translation: create/destroy address space, add/remove mapping
What sorts of services does SPIN require definition for for CPU management?
- Strand: abstraction for scheduler entity defined by app thread package
- Event handlers: block/unblock, checkpoint, resume
- Global scheduler: interacts with app thread packages
How does SPIN handle protection?
Through extensions. Extensions to core services only affect the applications that use the extension
What does SPIN achieve in terms of extensibility, protection and performance?
- Achieves as good performance as monolithic OS
- Is flexible/extendible
What is Exokernel’s approach to extensibility?
Uncouples authorization from use
How does Exokernel achieve extensibility?
Secure bindings:
- Library OS asks for hardware resource
- Exokernel binds library OS to hardware resource
- Exokernel exposes hardware resource to library OS via encrypted key
How are Exokernel secure bindings implemented?
- Hardware mechanisms (TLB entry)
- Software caching (shadow TLB)
- Downloading code directly into the kernel
How does software caching work within the context of Exokernel?
Each library OS has a “shadow” TLB to reduce start up penalty