Microkernels are better
Posted Feb 25, 2013 20:08 UTC (Mon) by khim
In reply to: Microkernels are better
Parent article: MINIX 3.2.1 released
It assumes it has just two rings available, a privileged ring for the kernel and an unprivileged ring for user space.
And this is related to Intel architecture... how exactly? Intel has four rings.
Okay, in those days 1MHz hardware was fast
Yup - and that's why ring-switching was FAST FAST FAST.
But put a microkernel on modern 50-series-style hardware, with the kernel in ring 0, the drivers in ring 1, and user-space in ring 3, and you'd probably have a system that could give a monolithic kernel a run for its money for speed, and blow it away for security.
For that you need to first make such hardware. Think about it: quarter-century ago 1MHz (Ok, more like 3-4MHz) was "fast" but memory latency was about 150ns and today 1GHz (Ok, more like 3-4GHz) is "fast" but memory latency is about 15ns. How come memory speedup was just 10x but CPU speedup was 1000x? The answer is well-known, of course: bunch of caches and deep, deep, pipelining. This approach is pretty hard to combine with FAST FAST FAST ring switching: either you keep all the data for different rings "in the ready" all the time (which increses latency of, e.g., L1 cache from 3 ticks to 4 ticks) and slow down all the other things by 30-50%, too or you have slow ring switch but fast CPU.
I doubt 30-50% slower CPU with FAST FAST FAST ring switching can beat faster CPU no matter the OS: in the end most of the time spent doing "real work", not CPU ring switching even with microkernel.
to post comments)