News for hackers. Stuff that matters.
Re:It’s Time for a Modern Synthesis Kernel by kragen on Tuesday July 02, 2019 @10:28PM (#20341115)
I don't know if it's such a hard problem as you suggest; it's pretty close to what a linker does, really. Have you looked at `C?
Re:It’s Time for a Modern Synthesis Kernel by gmueckl on Wednesday July 03, 2019 @05:44AM (#20342914)
The problem lies in making things work with optimizations. For example, how do you schedule instructions and allocate registers optimally when you don't know the exact sequence of instructions that is executed? Not gettimg that right costs you a bunch of performance. Then there are things like variants of the code that might be vectorized under certain conditions. You would need to find them in the compiler and be able to emit the proper alternative code templates and a way for the runtime to pick them up when appropriate. A full JIT could do all that at runtime, but that is also expensive to run and likely too big and buggy to exist in a stable and safe operating system kernel.
Re:It’s Time for a Modern Synthesis Kernel by AstralStorm on Wednesday July 03, 2019 @04:23AM (#20342583)
It gets harder when you want to do link time optimization. Without it, the approach is inferior to ahead of time optimization with some programmer input... (Degeneralization and devirtualization rather than specialization.)
Re:It’s Time for a Modern Synthesis Kernel by kragen on Wednesday July 03, 2019 @08:13AM (#20343579)
It's fine if it's inferior to ahead-of-time optimization with programmer input, because you don't have time for a programmer to optimize the kernel code anew every time you spawn a process or open a pipe or a socket. It just needs to be faster than what the kernel is doing now when you call read() or write() or whatever, without being too much slower when you open the file (etc.)

Like, ahead-of-time optimization with programmer input might take a few hours to a few days, and that's not really an acceptable execution time for the open() system call.