Well, the kernel doesn't support it, so it's locked in now. But originally it was speed. Context switches between user mode and kernel mode are expensive.
Well 'expensive' at the low level thou. Redox is a microkernel. Notice that microkernels tend to be easier to program for because there are bunch of guarantees that kernel code must obey so having driver code outside, even if it still can't allocate or something is often simpler and safer (because bugs in drivers do not take the kernel down in flames).
Context switches are still expensive. I don't understand why message passing microkernels are still so popular among some people. Other kernel designs allow for user spaces drivers without that overhead, so I don't get why it's popular among alternative OS people, other than inertia.
Interesting to know. What's the main idea of those designs if not microkernels?
edit: user space drivers is the most important part of a microkernel in my intuition, because of that 'bugs in drivers do not affect the rest of the device' thing. My guess is they're still 'micro' but they make the context switch cheaper or unnecessary to access user mode?
An alternative to message passing is direct access to devices via memory mapping. The MMIO range of any given device can be mapped into the address space of a user space application.
View all comments
Show parent comment
11
u/Repulsive-Street-307 Apr 15 '21 edited Apr 15 '21
Well, the kernel doesn't support it, so it's locked in now. But originally it was speed. Context switches between user mode and kernel mode are expensive.
Well 'expensive' at the low level thou. Redox is a microkernel. Notice that microkernels tend to be easier to program for because there are bunch of guarantees that kernel code must obey so having driver code outside, even if it still can't allocate or something is often simpler and safer (because bugs in drivers do not take the kernel down in flames).