lambda-kern
lambda-kern copied to clipboard
Support for userspace drivers
Requirements:
- Syscall to read/write ports (x86)
- Potentially syscall to request access to specific ports, so a faulty driver that attempts to access a port it hasn't requested, it can be terminated
- Memory mapping syscall
- Registering and handling interrupts from userspace
- Potentially by having a thread for each interrupt source, and blocking until the kernel messages it that an interrupt has been received
- Threads waiting on an interrupt could also potentially be re-prioritized on interrupt reception, and the scheduler called
- Registering a callback with the kernel would be more efficient, but would sacrifice some of the security/stability concerns of moving drivers to userspace
- Inefficient drivers whose interrupts fire often can bog down the system
- If drivers are run in kernel mode, they have greater access to the system