Hacker News new | ask | show | jobs
by lacampbell 2419 days ago
I love the idea of smaller more logical operating systems. I am surprised that in the era of giant tech companies with top programmers and a lot of resources the most commercially viable strategy is still "try and paper over the complexities of linux" instead of starting something smaller and more modern.
4 comments

When the CPU's developer manual is 2198 pages and still growing, any option other than starting with Linux and trying to keep up (i.e. VT, SGX, TPM, GPU, etc) will be extremely costly.

https://www.intel.com/content/dam/www/public/us/en/documents...

These things like Oberon and Inferno are from a more innocent era of computing.

I think that Intel’s cpu complexity (and arm and for that matter RISC v CPUs) is that they are designed to speed up existing software. Software that was written 50 years ago on simpler machines. Starting from scratch is not as complex as you might think if running existing software at “native” speed isn’t a requirement.
Are there any concepts?
Are we going to give up GPUs, virtualization extensions, SGX enclaves, memory barriers, upcoming AI-acceleration, etc? To my knowledge, there is no software concept that will performantly render these functional units obsolete.

If we keep the chip features, the OS will have to wrap them in one way or another.

edit: my personal preference would be to go full-Terry, but I know that's a pipe dream.

> starting something smaller and more modern

Where do you draw the line? Do you throw away Linux and write your own OS, which is bound to grow to the same level of complexity because it needs to deal with hardware complexity? Or do you throw away the existing hardware as well and start from silicon? Maybe even reboot the computing stack on an entirely different type of hardware?

I would be so down for a risc-V laptop running redox
Why not? Apple runs their own chips in the iPad and iPhone, with their own OS. Seems to be working out for them.
They didn’t start from scratch, though. iOS is derived from macOS, which is derived from NeXT (and FreeBSD if I recall right), etc etc.

iOS has a lot going for it, but it’s definitely not small, clean or simple.

(Ditto for the chips, which build on ARM, originally Acorn)

And they have a somewhat continuous team working on that OS since before Linux was a word. Same with Microsoft. Is it really relevant to any other company?
Apple haven’t been working on iOS longer than Linux has been around. It’s true that iOS is based on macOS which is based on NEXT (of various capitalisations), FreeBSD and a few other platforms. But Apples direct involvement starts at macOS and there’s very little FreeBSD/NEXT/etc in iOS compared to original code. Likewise you could argue that “Linux” predates Linux if you include the GNU user land and start tracing things backwards that way (I’m assuming “Linux” in the context of this discussion is GNU/Linux because it wouldn’t be fair to compare a kernel to a full desktop or mobile OS).

Ultimately I don’t think either arguments are particularly useful as all they demonstrate is that good technology is an evolutionary process of stands on the shoulders of other pieces of good technology.

I'm fond of the jocular statement that NeXT acquired Apple for -$429 million dollars.

Steve Jobs went from CEO of NeXT to CEO of Apple, and promptly started a project to scrap the existing "System" series of Macintosh operating systems in favor of a Unix derived from NeXTSTEP.

Sure, I didn't mean Linux isn't standing on the (partially the same) shoulders. What I meant is macOS/iOS and Windows teams are unique in shipping general-purpose OSs AND doing so and accreting code and expertise tied to that code since ancient times when "try and paper over the complexities of linux" wasn't an option at all.
Whether it’s 10 years, 20 years or 30. I don’t think it makes much difference after 10 in terms of the level of relevant expertise you’d expect. Particularly when you factor in staff leaving, getting promoted, etc and new engineers joining. Where Linux differs isn’t it’s age but rather it’s development model being decentralised. FreeBSD might be a more comparable example given the context you’re describing.
The problem of starting again becomes harder with each passing year because you have more hardware to support, more complicated software that needs porting and higher expectations from users about what a modern OS should behave like.

It’s a similar problem with creating new web browser rendering engines.

A browser engine is, I think, the main impediment to most non-mainstream operating systems being "useful" in a day-to-day sense.

It's just a massive amount of work, with literally millions of lines of code required, whereas a basic operating system is easily under 100k SLOC.

Plan9 and Inferno suffer from this. Haiku suffers from this. And Oberon is has the same issue.

I don’t think a lack of a browser was an impediment for Plan9 nor Oberon when you look at when they were released. It was more likely the momentum was already behind UNIX and similar platforms. Enterprises already had solutions to hard problems and weren’t willing to take a gamble on something new.

As for the desktop market, BeOS has a browser and that still failed. SkyOS had a browser and failed. AFAIK Haiku has had a Firefox port for several years as well (albeit I make no statement about how stable nor bug-free it might be).

When you have Microsoft and Apple heavily promoting their platforms, even going so far as to give educational institutions massive discounts knowing they’re indoctrinating future customers, it strikes me that the only way to achieve household success with anything new is with massive corporate backing and a decent chunk of good luck too. So personally I’d define Linux as an anomaly.

I also think you’re not making a fair comparison where you compare lines of code in a “basic” operating system to a fully featured modern browser. But I go into more details on that in another post further down.

I agree -- a browser wasn't needed at the time. But without one, they're not practical for use as a desktop/laptop/phone OS today. And I also agree that a browser is not sufficient (as you cited, BeOS/Haiku, etc) but it is necessary.

As a related example, NewtonOS (Apple's MessagePad/eMate OS), did have a couple of HTTP 1.1 / HTML 2.0 browsers. But it wasn't able to support SSL/TLS, nor JavaScript, and as a result using one today is impractical.

The world has moved on since the 90's. Some evolutionary lines had features that were lost.

> So personally I’d define Linux as an anomaly.

And, given the forces you describe, the ecosystem probably had room for at most one anomaly.

I think you're right, but I don't understand why creating a browser engine is such a monumental task. Is page layout really so complicated?
Page layout need not be complicated if you write it yourself in simple imperative code, for your own website.

But parsing the different standards of HTML and deal with invalid HTML in the "appropriate" way must be a lot of work. And implementing CSS to work with existing websites, and making it efficient, must be a PITA.

Much of that complexity was created in the name of discoverability. Given the amount of money that was spent on search and looking at the quality of search results nowadays, I'm not so sure.

In general the idea is to separate structure from style, and to allow developers to specify style more declaratively to enable them to make sites quickly. But I'm not positive that that worthwhile goal implies that the logic should be implemented in the browser. IMO it should be implemented in downloadable library code.

It strikes me as completely insane that it's more complicated to write a browser rendering engine than a whole OS. But I suppose the proof is in the pudding and the fact that there are so many more hobby OSs than hobby browsers must be testament to this fact.
> It strikes me as completely insane that it's more complicated to write a browser rendering engine than a whole OS.

There was once a programmer who was attached to the court of the warlord of Wu. The warlord asked the programmer: “Which is easier to design: an accounting package or an operating system?”

“An operating system,” replied the programmer.

The warlord uttered an exclamation of disbelief.

“Surely an accounting package is trivial next to the complexity of an operating system,” he said.

“Not so,” said the programmer, “when designing an accounting package, the programmer operates as a mediator between people having different ideas: how it must operate, how its reports must appear, and how it must conform to tax laws.

By contrast, an operating system is not limited by outward 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.”

The warlord of Wu nodded and smiled. “That is all good and well,” he said, “but which is easier to debug?”

The programmer made no reply.

The Tao of Programming, Geoffrey James, 1987

It depends where your benchmark is.

Writing a browser that passes acid tests and supports all the standards (old and new) as well as the sites that aren’t standards compliant but users might still expect it to work; that is an insane hard task. But building a console browser that supports a subset of standards and has no Javascript support is a much easier job (read: “easier” as in relative to the former task).

Much like building a kernel + CLI shell is easier than building a fully multi-tasking OS with GPU accelerated GUI compositing, stable ABIs, modular driver model, and full support for 99% of common hardware.

The biggest problem is that browsers are actually virtual machines nowadays, so you end up implementing two OSes.
Oberon actually has a browser. At least the Bluebottle (https://en.wikipedia.org/wiki/Bluebottle_OS) variant does: https://bbos.org/xref/WebBrowser.Mod.html
I've been considering doing this for Snapdragon SOCs. I'd probably start with the 855 or the 8cx and not worry about any backwards compatibility with anything other than the latest and greatest hardware.