An SMP version of micro:bian
Jump to navigation Jump to search
- The aim is the greatest possible simplicity, so mutual exclusion should be achieved by surrounding the whole microkernel with spinlocks, placed at the top and bottom of
- Interrupt handling by device driver process requires that the driver process should run on the same core where the interrupt happened. A simple way of achieving this is to enable interrupts only on core 0, and schedule driver processes (those with priority P_HANDLER) only on that core. One way of arranging this is for the call to
connectto reschedule the calling process on core 0; then
connectmust be called before any code that configures interrupts for the device.
- When a core is idle, it should go to sleep. That means there must be a wake-up mechanism between cores, so that when a process on one core sends or receives a message, the scheduler on the other core can act to run any processes that are awakened. (That's the purpose of WFE/SEV, isn't it?) This mechanism is also needed when a process on core 1 becomes a device driver, so that the scheduling invariant is maintained, if we care.
- A generalisation of the above would be to have each device interrupt enabled on only one core, but allow the client programme to choose which core is used for each interrupt, perhaps by an argument to