3 ms·
>, an operating system is not limited by outside appearances. When designing an operating system, the programmer seeks the simplest harmony between machine and
by jasode 5y ago
>, an operating system is not limited by outside appearances. When designing an operating system, the programmer seeks the simplest harmony between machine and ideas. This is why an operating system is easier to design."
I think I understand the intuition behind that... in other words... coding an os kernel seems to have less entropy, less degrees-of-freedom, less subjectivity ... than frontend programming like painting GUI pixels and Javascript-framework-of-the-month.
But there's a lot of subjectivity and philosophical debates about low-level os design:
- the famous "Worse is Better" essay tries to explain difference between "New Jersey approach" (Bell Labs UNIX) vs MIT approach of error handling in a system routine [1]
- famous debate between Linus Torvalds and Andrew S. Tanenbaum about microkernels vs monolithic kernels [2]
- David Cutler (designer of VMS & Windows NT) criticizing UNIX i/o architecture[3]
- even lower level than o/s is cpu design where some criticize RISC-V not having arithmetic overflow traps in the minimum base specification. And in the 1990s, the RISC (MIPS philosophy) vs CISC (Intel philosophy) was a big debate.
[1] https://dreamsongs.com/RiseOfWorseIsBetter.html https://dreamsongs.com/RiseOfWorseIsBetter.html
[2] https://en.wikipedia.org/wiki/Tanenbaum%E2%80%93Torvalds_debate https://en.wikipedia.org/wiki/Tanenbaum%E2%80%93Torvalds_deb...
[3] https://retrocomputing.stackexchange.com/questions/14150/how-should-we-interpret-dave-cutlers-criticism-of-unix/14151 https://retrocomputing.stackexchange.com/questions/14150/how...
- yup00 5y agoExactly. Dig around in C land and you’ll find 100s of opinions, even more libs and toolkits that came and went out of fashion. Web stacks are “computing” to industry right now. In the 80s and 90s it was OS and database. If low-level had the old economic attention, we’d see the same activity and mess as we did in the 80s and 90s. Everyone has a compiler to tell you about, and a build system DSL that’s just right for your problem! But big corp largely controls that and so a new layer of abstraction was added via web, and we’re seeing a shift now to less UI, and machine driven decision making that just gives us the next step in the recipe. Frankly I don’t mind technology for navigating human society; buying stuff and literal navigation. I still unplug with musical instruments and the forest. The addictive applications we’ve built in technology; games, social and multimedia, got really banal for me a long time ago. If I hear things like “Itsa me, Mario” or something about Halo I recoil at the cringe. I guess I don’t want my psychedelic noise wrapped up in branding and consumerism.
- ekster 5y agoExactly, working at a low level still means that “the programmer operates as a mediator between people having different ideas”. The different people are just hardware builders instead of library writers.
- wincy 5y agoTempleOS is the one pure operating system created without any debates. RIP Terry A. Davis.
- lliamander 5y agoPerhaps another way to describe this intuition is that with operating systems, the developer is also the subject matter expert and the one setting the requirements. When you are the one setting requirements, those requirements are going to seem inherently less arbitrary than requirements set by someone else.
- pdpi 5y ago> I think I understand the intuition behind that... in other words... coding an os kernel seems to have less entropy, less degrees-of-freedom, less subjectivity ... than frontend programming like painting GUI pixels and Javascript-framework-of-the-month. I don't think that's the right takeaway. A decade ago I worked as an SAP consultant, and did some payroll projects in it. The display part of it was easy. All they wanted was a great big table display, the moral equivalent of a read-only Excel spreadsheet. No faffing about with CSS or Javascript or whatever. No, the real complexity was the freaking business logic. Office workers, executives, contractors all had different rules for how their pay was calculated, there were all sorts of line items that applied to different classes of employee differently. The company had spent years building those reports by hand and there was a whole lot of organisational knowledge hidden in their heads, corner cases and exceptions all over the place. The sort of thing you can navigate in your head relatively easily if you've been doing it for years on end, but a newcomer has no chance of understanding - so a lot of iteration was involved in getting where we needed to be. Put fiddly business logic and rapid iteration together, and you're burying yourself under a massive pile of spaghetti code in no time, flat. Trying to keep all of that sane both for myself and for whomever came after me was challenging in ways that none of the more systems-y work I've done since has ever replicated.
- cgh 5y agoYes. This is why the much-maligned (around here) category of “enterprise software” is so hard and why the results are often kind of shitty.
- phendrenad2 5y agoBut I think that even with all of that, writing an OS is still much easier than an accounting package. The way forward is paved smooth by hundreds that have gone before. And by that I mean, hundreds of Unix clones have been made and open-sourced. Things like microkernels and NT-style I/O architecture are esoteric things that you only see in the embedded world (which Google seems to be limiting Fuchsia to at the moment) and enterprise-oriented operating systems (like Windows, which home users only use out of a weird quirk of history).
- makapuf 5y agoGenuinely interested, do you have some pointers about what you mean by NT-style IO? How would you characterize it?
- spc476 5y agoPOSIX is ask first (can I do I/O?) then do, while NT is do, then ask (is it done?).
- phendrenad2 5y agoI was referring to the "David Cutler (designer of VMS & Windows NT) criticizing UNIX i/o architecture" comment above, which apparently refers to Dave Cutler's criticism of Unix as "Get a byte, get a byte, get a byte byte byte", which seems to me to refer to the Unix/Linux style of programming (in which programmers overuse things like getch() and putchar()). Whew. But. There's another, much bigger difference between Unix and VAX/VMS/WinNT: The way I/O operations are handled in the kernel itself. In Unix systems, the kernel just passes I/O operations directly to the driver code, which immediately tries to do the operations on hardware. It's a very microcontroller-ish view of the world. WinNT treats I/O operations as sort of a "packet" which encodes the operation to be performed. That packet passes down through the layers of the kernel, including 3rd party modules and eventually drivers, until the operation is performed on hardware. Then, another packet percolates back up the stack to your app with the result. Things like antivirus, dropbox, etc. can insert themselves into the stack and intercept/modify/reroute I/O operations and results globally. I think that Linux probably has something like this, or you can probably cobble it together by using async I/O, io_uring, and/or eBPF.
- pjscott 5y agoMany are the sects who pursue the Way, and countless their contradictions! Those who write accounting apps, in contrast, are just hella boned by uninteresting complexity. In my experience OS kernels just make more sense than most front-end code, regardless of the kernel design. There may be different plans for each kernel, but there is a plan. Major things change less frequently, changes are better thought-through, and people think more about what they're doing. Probably this makes economic sense, and the costs of kernel breakage are that much more than the costs of a broken UI, but definitely the kernel's design is easier to make -- because it has a design, rather than ever-shifting chaos.