The exokernelâs sole function is to allocate, deallocate, and multiplex physical resources in a secure way: physical memory, CPI, disk memory, DMA channels, I/O devices, translation look-aside buffer, addressing context identifiers, and interrupt / trap events.
Security enforced by associated every resource usage or binding point with a guard that checks privileges.
What is the minimum functionality the kernel needs to provide in order for this primitive to be implemented in application space? Â
OS must support bootstrapping page tables, alloc physical memory, modification of mapping hardware (TLB) and exception propagation.
Simple bootstrapping: small number of guaranteed mappings to map PT and exception handling code.
Physical memory allocation should support requests for given page number.
Privileged instructions can be wrapped in sys calls, and writing to privileged state is associated with access checks.
Exception propagation: save scratch registers in application space then jump to app-specified PC address.
Need: exception program counters, assoc address space, prologue and epilogue code to be called when time slice is initiated and expires. Let the application do the context switching.
Inter Process Communication (IPC)
Transfer a PC from one protection domain to a value in another, donating the current time-slice, installing the called domainâs exception context, and indication of which process initiated the call.
Problem with micro-kernels
Allow replacing device drivers and high level servers, BUT this can only be done by trusted applications.
They still try to provide a virtual machine to applications.
Rigid interface is rudimentary compared to monolithic counterparts. They basically cut a shit ton of necessary features in order to be simple.
Basically, they try to make an OS small, but do it in the wrong way.
Type-safe languages, software fault isolation, are good applicable tools.