5 ms·
Okay, so we move to microkernels, which murders everybody's performance because we still don't know how to work around context switching being expensive, and fo
by yjftsjthsd-h 4y ago
Okay, so we move to microkernels, which murders everybody's performance because we still don't know how to work around context switching being expensive, and force everyone to do the constant additional effort to define exactly what components should have permission to access what parts of their system (unless you want everybody to use one-size-fits-all defaults and lose functionality, or just give everything more permission and lose the security benefit). Now in this hypothetical world, an SMB server has a vulnerability. Technically, the situation is much improved; in this situation an attacker only has access to whatever that component had access to. So, just all the files you shared, and (hopefully read-only) user information. And probably network access. Is that really a good cost/benefit trade?
- xwolfi 4y agoNo, micro kernel are only liked by people with limited imagination. They are perfect, yet unusable.
- jacquesm 4y agoEvery vehicle you've driven that was made in the last 25 years has one or more instances of micro kernels in them. They are perfectly usable, and the performance hit isn't nearly what people think it is. What you give up in throughput you more than get back in deterministic behavior, reliability and improved latency.
- nix23 4y agoBlackberry(QNX), Nokia(Symbian), MarsRover (VxWorks), TrueUnix64, Windows and and and...but yeah they are unusable.
- jacquesm 4y ago> because we still don't know how to work around context switching being expensive Context switching can be as expensive as you want, or almost as cheap as you want depending on the limitations of the hardware. Back in 1992 on by todays' standards very anemic hardware you could do 200K slices per second, today likely orders of magnitude more than that. I suspect that lots of people - not necessarily you - that have very clear opinions on micro kernels and their capabilities have never actually used them.
- Sirened 4y agoHave you actually benchmarked a context switch on modern hardware? A full switch (including register spilling and page table swap) can be had in <150 cycles on even cheap, older Arm A-series cores like the Cortex A72. We're not still living in a world where a context switch forces you to flush the TLB, you literally just have to pay the cost for the trap, spill, page table swap, unspill, and return. This cost is even lower of modern ARM processors which support speculative exceptions where you can perform the entire context switch speculatively.
- paulmd 4y agoNetflix definitely benched their context-switches and they determined it was expensive enough to be worth engineering out. https://www.phoronix.com/news/Netflix-NUMA-FreeBSD-Optimized https://www.phoronix.com/news/Netflix-NUMA-FreeBSD-Optimized https://2019.eurobsdcon.org/slides/NUMA%20Optimizations%20in%20the%20FreeBSD%20Network%20Stack%20-%20Drew%20Gallatin.pdf https://2019.eurobsdcon.org/slides/NUMA%20Optimizations%20in...
- zorgmonkey 4y agoIf context switches are performance problem you are probably pretty far down the optimation rabbit hole, but the articles you linked have nothing to do with context switches, they are about NUMA optimizations to sendfile on freebsd.
- monocasa 4y agoThe whole point of using sendfile(2) was to avoid context switches between reading data from disk and sending it via the network stack.
- ilyt 4y agoSo massive overhead when you need to context switch between network process, I/O process, and FS process just to pass some bytes, where in monolithic kernel that's just a cost of few function calls
- pjmlp 4y agoUrban myths that keep being retold. Not only we have QNX, most Android drivers since Android 8 are userspace, macOS is incremently moving to userspace drivers killing kernel drivers for anyone else other than Apple, most newer Windows drivers since Vista are userspace, Fuschia is microkernel based and already has some production deployments,... And guess what, they perform just fine.
- skykooler 4y agoWhat is fuchsia used for in production? I wasn’t aware that anything was running it yet.
- smoldesu 4y agoProbably rsyncing a "production" tarball to a backup server, just like all of RISC-V's current "production" usage.
- pjmlp 4y agoCurrently it replaced the OS that powers Google smart displays devices, https://arstechnica.com/gadgets/2022/08/googles-fuchsia-os-lands-on-its-second-device-the-nest-hub-max/ https://arstechnica.com/gadgets/2022/08/googles-fuchsia-os-l... With Google Nest speaker on the horizon, https://9to5google.com/2022/12/07/google-nest-audio-fuchsia-upgrade/ https://9to5google.com/2022/12/07/google-nest-audio-fuchsia-...