3 ms·
I understand the article was from 2004, when PCs were about 2-4x slower. But to me, a microkernel isn't about performance. It's a complement to monolithic kern
by byuu 11y ago
I understand the article was from 2004, when PCs were about 2-4x slower.
But to me, a microkernel isn't about performance. It's a complement to monolithic kernels. When I am writing source code, or typing up an important document, or archiving files for preservation ... I want to be doing this on a microkernel OS.
I have had my FreeBSD system crash completely due to the video card driver (from nVidia, of course) accessing unmapped memory. That's completely illogical. Drop me to a text terminal, or hell, force me to SSH in to unmount and reboot cleanly. But don't drop the entire system. Yet with a monolithic kernel, how can you be sure the video driver didn't corrupt some other part of the kernel space?
Likewise, if I want to play the latest video game, or I'm using it as a render farm, or to mine bitcoins, or I need to run a web server that needs scalability more than stability ... then I want to be doing that on a monolithic kernel.
We have most OSes that focus on raw performance, then we have NetBSD that focuses on portability, and then OpenBSD that focuses on security. Where's our (non-toy) OS whose primary focus is on stability? So far, Minix 3 looks like the most promising option, but it has no enterprise file system like ZFS, and is severely lacking in manpower.
- KMag 11y ago> Likewise, if I want to play the latest video game, or I'm using it as a render farm, or to mine bitcoins, or I need to run a web server that needs scalability more than stability ... then I want to be doing that on a monolithic kernel. For the latest video game, with a microkernel (and an IOMMU keeping the video card from trashing memory), when switching to fullscreen mode, your OpenGL library could request that your video game process become the video driver, with no loss of security or stability. That gives you lower overhead access to the video card than a monolithic kernel. For compute-bound tasks such as bitcoin mining, a small realtime microkernel will give you better instruction cache utilization. (Back in university system architecture class, I ran cache benchmarks under Linux, QNX, and Win2k on my triple-boot desktop, QNX gave me the best cache performance.) If you need to run a high-performance webserver, if you need absolute performance, run it in-kernel. If not, a microkernel (and a properly configured IOMMU) allows you to safely make your process the network driver as well as filesystem and disk drivers for your dedicated www data drive. Now, you'll want a second network port with its own chipset (perhaps on its own card) for being able to ssh in if the webserver crashes, but you'll have higher performance than a monolithic kernel. In short, microkernels along with appropriate hardware protections allow you to safely make your device drivers just ordinary libraries that run inside your critical processes, giving you higher performance without sacrificing security or stability. EDIT: I should also point out that Oracle, Postgress, and other high-performance RDMSes go through a lot of work to do "kernel bypass". A microkernel with minimum cache footprint would better get out of their way and more safely turn over more functionality to the application.
- chousuke 11y ago> Now, you'll want a second network port with its own chipset (perhaps on its own card) for being able to ssh in if the webserver crashes I don't think this is necessary with modern NICs and SR-IOV. I imagine you'd just configure one virtual function for the web server, and one for management. It's pretty common already. Similarly you might have a RAID controller capable of LVM-like "partitioning" of the disk array so that you can present two virtual disks that can be dedicated to whatever purpose you need. I don't know if these actually exist yet, though.