3 ms·
I applaud lessons taken from Liedtke/L4, a major step in the right direction. Now I can look at that project seriously, rather than consider it yet another pre-
by snvzz 10y ago
I applaud lessons taken from Liedtke/L4, a major step in the right direction. Now I can look at that project seriously, rather than consider it yet another pre-Liedtke mistake.
I'm not so sure, however, about concurrency in the kernel. The locks and added complexity certainly aren't going to help keep WCET low and bound.
NICTA's SSRG did study this: https://ts.data61.csiro.au/publications/nictaabstracts/Peters_DEH_15.abstract.pml https://ts.data61.csiro.au/publications/nictaabstracts/Peter...
- Yoric 10y agoOut of curiosity, do you have a reference to "lessons taken from Liedtke/L4"? Out of the blue, I have no clue what it means :)
- snvzz 10y agoI'm thinking mostly about the principle of minimality (what can be out of the kernel should be). But there's some more contributions from L4. The ACM did a talk on those insights 20 years later: https://www.youtube.com/watch?v=RdoaFc5-1Rk https://www.youtube.com/watch?v=RdoaFc5-1Rk The associated NICTA SSRG paper: https://ts.data61.csiro.au/publications/nictaabstracts/Elphinstone_Heiser_13.abstract.pml https://ts.data61.csiro.au/publications/nictaabstracts/Elphi... A more recent NICTA SSRG paper: https://ts.data61.csiro.au/publications/nictaabstracts/Heiser_Elphinstone_16.abstract.pml https://ts.data61.csiro.au/publications/nictaabstracts/Heise...
- cm3 10y agoYeah, I wish they had teamed up with Robigalia in order to build on seL4 or at least translated that 1:1 to Rust, foregoing the verified nature of seL4.
- snvzz 10y ago> foregoing the verified nature of seL4 If anything, seL4 is the fastest L4 out there, proving that they can be fast and proven at the same time. So, why would anyone want to do that?
- cm3 10y agoBecause Redox's aim is to be as little non-Rust as possible. I agree it'd be ill-advised to rewrite seL4 rather than use it, even though it's been a while since a revision was verified, because it's been battle tested, is continually improved and small enough to trust.
- cm3 10y agoWe really need to have a mainstream desktop microkernel operating system because: 1. no need anymore for kernel bypass mechanisms (too many to name for linux, btw) 2. decoupling of drivers from the kernel 3. instead of waiting for a backport of a new syscall to an LTS kernel, something like that will be just part of your system's stdlib 4. extremely reduced need to reboot a machine 5. driver faults can be recovered from gracefully, just like in Erlang's supervisor scheme 6. seL4's capability system allows for a safer system overall, with less hacks Seeing how even Intel is introducing a message passing network with growing number of cores in their mainstream CPU designs, we should be over the general objections regarding a message passing design. They call it QMD, and it's something they already have in their Xeon Phi line for some time for obvious reasons, just as countless other general purpose or special purpose chip designs have had for a long time. I wonder if one could get funding for an effort like Robigalia to reach production quality and have Servo running on it. Given the feature set of Servo, it's a safe bet that the required features would provide a reasonably complete system to replace your Linux machine. The bigger struggle would be getting hardware vendors to contribute to FreeBSD and Linux drivers to also provide some level of support for a non-C code base. Though, moving up to that abstraction and language level should make it easier to write working hardware drivers.
- cm3 10y agoOh, and if you extend it with multi-kernel functionality, scaling to very large number of cores/chips will also be solved in a fundamentally cleaner way. I haven't looked into it but there's an seL4 branch that implements multi-kernel support. If you don't know what this is, it's simply a way to have one kernel instance per processor, making scalability easier. Fujitsu has a linux variant to achieve the same and I think it's a goal of Barrelfish as well. Similar solutions exist in certain linux and dragonflybsd subsystems where, say, the network stack uses one scheduler or queue per core, removing the need for synchronization in a coarse way. Then, of course, you have to be smarter about scheduling things, but if you bind certain hardware bits to cores long-term, it should avoid accidental overhead via random migration. Language runtime VMs do the same for green threads with job stealing designs and pinning schedulers to cores. None of it is bleeding edge research material, we just have to use what's been invented.
- cmrx64 10y agoI wrote on their forum about why they "shouldn't" use seL4, and definitely shouldn't port it to Rust: https://discourse.redox-os.org/t/why-not-port-sel4-microkernel-instead-of-starting-from-scratch/337/5 https://discourse.redox-os.org/t/why-not-port-sel4-microkern... If the goal is trusthworthy, reliable software, then you should use seL4. If the goal is to yell about how great Rust is, you could port seL4 to Rust.
- pjmlp 10y agoFully support your point of view. What we always see on programming languages is that when shortcuts for arriving faster at our goals are taken, usually they give ammunition to remarks of the sort "language X cannot do Y". Apparently most lack vision and need to be proven wrong. So I hope they manage to just use Rust and Assembly. EDIT: Improved the sentence
- mickronome 10y agoI thinl the paper is a bit unclear about how one can come to that conclusion since concerning the Redis benchmark they state "The figure shows that throughput is independent of thekernel variant. Further investigation reveals that overall system throughput is limited by the network bandwidth, andthat the all cores have significant idle time." If you are network limited you might not _really_ be testing in-kernel locking in the general case. But there might be something about the kernel that allow them to generalise even with low load, but I can't see anything obvious that would make a certain kernel immune to high load induced issues, but then I'm largely ignorant about L4 et al.
- naasking 10y ago> I can't see anything obvious that would make a certain kernel immune to high load induced issues, but then I'm largely ignorant about L4 et al. The typical system call in a modern microkernel costs on the order of hundreds of cycles. Fine-grained locking would by itself probably double this cost for almost no gain. Just waiting the hundreds of cycles is likely to be just as good as a fine-grained lock in such kernels, and the complexity savings are significant.
- valarauca1 10y agoI was midly in shock when I looked in to L4 message passing times [1]. 250-300 cycles on x86_64 processors, and ~150-300 on ARM. As somebody interested in concurrency what is being done internally to pull off this speed, but maintain extra-thread consistency in a SMT-type system? As far as I know even a x86_64 memory fence will require around >2,000 cycles. I understand you create a notification object to pass a message, but don't you have to collect these notification objects at some point? Edit 1: I'm reading the manual [2], but I'm just becoming more confused. If you are passing register files, swapping stacks normally takes ~3ns even with small stacks. Or is the 300 cycles just the send time? [1] https://ts.data61.csiro.au/publications/nictaabstracts/8988.pdf https://ts.data61.csiro.au/publications/nictaabstracts/8988.... [2] https://sel4.systems/Info/Docs/seL4-manual-2.0.0.pdf https://sel4.systems/Info/Docs/seL4-manual-2.0.0.pdf