Hi,
Rusky wrote:Brendan wrote:As soon as you start doing IO priorities in the kernel then you end up with queues of pending requests in the kernel too (otherwise kernel can't choose which request has highest priority) and you end up with a full blown disk driver with all the "policy" you'd have in monolithic kernel.
MIT did put an IO scheduler in the kernel. What they didn't put there was anything to decide which blocks to schedule.
With an IO scheduler in the kernel; how can 2 different "library OSs" do IO priorities differently? For example; maybe one library wants to switch to "bandwidth optimised mode" (where it ignores IO priorities and does pure
LOOK algorithm) when there's too many pending requests; and another library is trying to do "soft real-time" and wants to ensure IO for real-time threads always happens before anything else.
Surely you can see that this is impossible to resolve - either:
- There's a global IO priority policy that can't be changed; and therefore it's impossible for different libraries to do IO priorities differently, which defeats part of the theoretical benefit of having an exo-kernel
- The libraries are responsible for their own "local IO priorities" scheme; and "global IO priorities" can't be done, which defeats part of the theoretical benefit of having an exo-kernel
The essential problem here is that you have mutually exclusive global requirements - you can't ignore IO priorities (under load) to make one library happy while also guaranteeing IO for real time threads happens first to make another library happy.
This same "mutually exclusive global requirements" problem effects everything, not just IO priorities - CPU time scheduling, power management, all caching, swapping, physical memory management, etc.
The "mutually exclusive global requirements" problem means that, in practice, it's impossible to truly achieve the "different libraries are able to improve performance by doing things differently" theoretical benefit of exo-kernels.
Once you realise that "different libraries are able to improve performance by doing things differently" is essentially impossible (beyond superficial lip service) and shift things like IO priorities, etc into the kernel; what you're left with is just a minor variation of "monolithic kernel"; where different libraries support different "OS personalities", like POSIX, or WSL, or Wine.
In that case you end up with "identical to monolithic in every way possible (just with a different kernel API)", with POSIX and/or Win32 and/or whatever implemented as a library in the same way it has been for most monolithic kernels for as long as I can remember.
Does "monolithic with lower level kernel API" make sense? Yes, it does (and it's always annoyed me a little when beginners assume "POSIX = kernel API"), but this does not make it a different kind of kernel.
Cheers,
Brendan