by still_grokking · 4y ago · 0 comments
If you want novel computer systems you can't build them on top of the old ones. That's the whole point of Pike.
An OS is the thing in about Linux (kernel) scope. The whole point is that this is something that is by no mean "done". If you want innovation in this space you need to build exactly such a thing from scratch!
But the OS is only one part of systems design. Doing something novel in this area would be to continue where we stopped around 1970. There was no progress since than. Only one computer architecture with only one OS left. Since than nothing truly innovative was even tried. (OK, to be fair, almost nothing. There been things like Intel's iAPX 432, or Microsoft's Midori, or things like the Connection Machine. But mainstream is still on the std. tech form the 70'. Even mainframes are actually technological more advanced, as they had for example multiprocessing, VMs and containers already decades ago).
I for my part think that if we would rethink computers form the ground up in light of today's possibilities they would be very very different. Alone the security hell today is only there because we still want to run "normal C programs". Everybody knows that this is not fixable without throwing away some of the old concepts. Still nobody wants to move. (Almost perfectly secure computers would be possible. You "just" need to build capability security into CPUs, the OS, and all apps…). Or another example: Scaling to many many cores would be much easier if computers would be fully data-flow aware. But currently we like to pretend that our CPUs are still PDP-7s. They need to offer the exact same interface (conceptually) or else this would not match the C abstract machine any more 1:1… But the CPU than needs to use a built in "hardware JIT" to translate the sequential command streams it receives to its internal data-flow operations. Somethings that's extremely inefficient and overly complicated—besides that it conceptually can't even help much. There is only so much parallelism extractable form an inherently sequential description of computation… (The most crazy part about this is that we have plenty information available on the high level which we happy erase during compilation, so we can present a "nice flat command stream" to the CPU. That's imho pure insanity). But nobody dares to rethink such systems as a whole: which means form the languages and their abstract machines, through the concrete hardware, the OS level, up to application design. Things like the von Neumann bottleneck were discussed already almost 50 years ago. The issue remains open to this day. Just put another layer of caches on top. Nobody cares about efficiency anyway… Because rewriting software would be to expensive. So the hardware can't be improved. So software needs to optimize for the old hardware concepts. Which leads to the dead-lock in which we're currently, where no substantial improvement can be made any more.
We're in this trap since 50 years. And that's why systems research is absolutely dead by now.
My 2ct. Sorry for the long post. But I have strong feelings about that topic.
Nonsense
ca 30 years ago there were (serious!) efforts to fix this on the CPU level - this whole VLIW CPU/smart compiler with explicit parallelism. Intel Itanium, Transmeta, Elbrus to name a few. It didn't work out well.
System research might produce something looking good but not working out well at the end.
But I tried already to explain why I think those things failed: It's all about the software.
You can't build a "sufficiently smart compiler" if the task is to parallelize an inherently sequential command stream.
This endeavor failed because it was part of the wrong effort.
The whole point is that people didn't think in terms of systems design any more at this time! They looked on "the hardware problem" in separation.
The expectation was that you can take a program written for "a fast PDP-7" add some "smart compiler" magic on top, and let this run (hopefully) faster on an improved hardware architecture. This didn't work out. Imho to no surprise.
I think the problem lies in the mental model behind computers which dominates the perception is since some time. We're almost exclusively (at least when it comes to general computation) left with the the model of a sequential command stream machine. CPUs execute (interpret) a sequence of instructions. Those instructions may alter an "infinite" (or at least "gigantic enough") global state in arbitrary ways. That's the basic model.
As long as your software is basically written with this model as background you can't "fix this on the hardware level", at least without real magic.
What we no do is to mitigate the problem as best as we can with methods that reached imho completely insane levels.
I think that we could find much better solutions if we would take a step back and rethink the machine in whole. I mean, software hardware co-design is a thing, only not when it comes to general computation especially not together with also OS / runtime (software) design.
My current personal favorite idea how thing could be improved and simplified is to see a computer as a graph of event-stream processors. This mental picture scales nicely on different "zoom levels". From raw hardware to the runtime level to (distributed?) application design. Only that it would require languages that compile down to such a model in an efficient way. A command stream language wouldn't map good or likely even acceptably (same problem as with the old "more exotic" hardware designs).
BTW: For number crunching VLIW and compiler guided parallelism works quite fine. Vector CPUs anybody? That were the fastest computes once, afik. And since MMX up to AVX the whole idea is a big mainstream success. (We're not even talking about GPUs here of course, that's not the topic; nobody tried to replace "typical" CPUs with GPUs so this does not count).
I'm using the standard street definition in which the OS is everything that you get on a fresh (desktop) OS install, not just the kernel.
There's very little research available on kernels because their shape is largely dictated by the hardware design, and the hardware design is largely dictated by physics and what the manufacturers give us. But as you go further up the stack the options widen considerably. You can start to consider user interfaces, application programming models, etc.
"You just need to build capability security into CPUs, the OS, and all apps…"
Pure cap systems are an old idea that have never worked. They're too cumbersome for programmers and affect API design in problematic ways.
But here's the thing. If you disagree, you can go ahead and prove it. You don't need a custom CPU. Figure out the higher level software issues first, and if you ever get to the point of needing actual CPU changes then fork qemu and virtualize your intended design. Make it so custom hardware is just an optimization once the core ideas are worked out.
That's what I mean by doing stuff at a higher layer. The interesting and tractable problems are all at the level where you can just throw up a fullscreen window, use direct IO to grab a block of disk space and off you go. Start from the top and work down, not bottom and work up.
BTW you'd probably like the Mill architecture. It tackle a lot of the things you're talking about. Comes out of the commercial world though, not academia.
Free doesn’t just succeed because people don’t want to pay. It succeeds because you can just copy it with zero friction. It’s viral.
Still I don't think that it has "won" because it's amazing on the tech level. It really isn't!
It's a big hack. With ridiculously stupid / primitive ideas behind it. (Just to name one of my favorite elephants in the room: A stream of "chars"—whatever a "char" is—is a "data format"? Even a "universal" one? Alone saying such things out loud is absurdly foolish, imho).
But by now legends have formed around the whole story. Most of the "Unix philosophy" for example is a post-hoc invention by people who have some strong urge to "look smart" in retrospective…
The truth is Unix started as a toy without any serous planing behind it. But than business discovered it by chance, and business came to to the conclusion that "a Bobbycar is good enough" as long as it doesn't cost anything. Business is never interested in excellent technical solutions! It's always only interested in "the cheapest shit that gets the job done"™ (barely). Unix fits this pattern very well.
A small reminder where we're still standing mostly:
Problem is likely that people just don't know anything else by now.
If all you've seen is Windows and a Unix clone, well, you could indeed come up with the idea that Unix is "well designed". Even it's actually not designed at all, and more or less everything was just a random accident (and usually even the worst, but "simplest", option around).
Nothing beats "free & good enough".
But it blocks now any meaningful progress. That's a pity.