News for hackers. Stuff that matters.
Re:Writing an OS in Rust: Advanced Paging by pjc50 on Monday January 28, 2019 @11:42AM (#19018855)
Maybe, but if you dont't have a POSIX API you'll cut yourself off from a lot of applications. Even Windows is gradually admitting defeat with WSL.

You can only get adoption of a non-POSIX OS if it offers something really unique to the user, or is in a very different market space.

Re:Writing an OS in Rust: Advanced Paging by AnIdiotOnTheNet on Monday January 28, 2019 @12:26PM (#19019220)
You can do it in a VM or compatibility layer. Your OS can support "personalities" like Windows uses to implement WSL, but with containers. So now you can have multiple POSIX containers on your non-POSIX system.

You should encourage people to make native software using the new paradigms and abstractions of the OS, built from the ground up with decades of hindsight, rather than encouraging crappy ports.

> You can only get adoption of a non-POSIX OS if it offers something really unique to the user

At this point, just not being built on 50 year old crappy standards would be pretty unique. I have my own personal wish-list of features that would lure me in even if the only hardware supported was an RPi.

Re:Writing an OS in Rust: Advanced Paging by glhaynes on Monday January 28, 2019 @03:54PM (#19020986)
You still end up in the OS/2 situation - even if non-native apps didn't always run great, had much worse memory usage, didn't feel native, etc... they were still good enough that nearly nobody (comparatively) wrote native OS/2 apps. It's not impossible to imagine an alternate past where OS/2 had worse DOS/Windows compatibility and ended up more successful! (In actuality, I think it'd probably have done even worse — showing that the strategic options to replace the foundation of an entrenched ecosystem are "bad" vs. "worse".)

I'd like to see other paradigms explored, too, but it seems unfortunately hard to get there from here.

Re:Writing an OS in Rust: Advanced Paging by AnIdiotOnTheNet on Monday January 28, 2019 @04:13PM (#19021139)
Yeah, it is hard. So what? So is just about everything worth doing.

One thing is for certain: you will not replace the current players by cloning them.

Re:Writing an OS in Rust: Advanced Paging by kbenson on Monday January 28, 2019 @06:08PM (#19021997)
Isn't that how Linux replaced most the UNIX players, by cloning them?
Re:Writing an OS in Rust: Advanced Paging by AnIdiotOnTheNet on Monday January 28, 2019 @07:21PM (#19022537)
I think that had more to do with the important innovation of being free and open.
Re:Writing an OS in Rust: Advanced Paging by kbenson on Monday January 28, 2019 @08:19PM (#19022847)
There were plenty of free and open operating systems. Linux and FreeBSD had the advantage of also being similar if not the same as what they were replacing, as well as allowing a lot of the software that was designed for UNIX's to also work with little or no change. In other words, they cloned the look, feel and compatibility (well , FreeBSd didn't really clone it, it IS it).
Re:Writing an OS in Rust: Advanced Paging by AnIdiotOnTheNet on Monday January 28, 2019 @11:10PM (#19023691)
IIRC FreeBSD was legally nebulous at the time, and Minix couldn't be modified and redistributed. I don't recall any other significant players.
Re:Writing an OS in Rust: Advanced Paging by kbenson on Tuesday January 29, 2019 @12:00AM (#19023898)
AFAIK, any possible nebulous legal situation with FreeBSD should have been resolved by late 1994[1], which is extremely early in Linux's lifetime if we're talking about supplanting major operating systems. I think you're right that there weren't a lot though.

That said, I can't imagine Linux actually having gone very far if it wasn't a UNIX clone. I think it would have been a real long uphill battle and it would have gotten handily beat by whatever open source UNIX clone came along next, for the pure reason that it's much easier to deal with POSIX compliance (and all the software it brings that actually makes it worthwhile to run the OS) when trying to copy a system that already did it and worked out the kinks.

I mean, if someone came out with a free (maybe open source) version of Windows at that time which was legal, we could easily be living in a world where that's the dominant free OS.

I guess what I'm saying that that being vastly better on one metric (in this case, free) doesn't necessarily mean you'll take over a market (because a free operating system that can't run any software isn't very useful), and just being a clone won't either, but being a clone that's generally as good one most metrics and vastly better on a few others (e.g. a UNIX which is also free and open source, instead of just some other UNIX) may.

1: https://en.wikipedia.org/wiki/FreeBSD#Lawsuit

Re:Writing an OS in Rust: Advanced Paging by simcop2387 on Monday January 28, 2019 @12:02PM (#19019045)
That said, hiding the POSIX API behind a compatibility layer like WSL can have some major advantages because it means that updates to either side can be done independently. That would mean you can have the unique offering and the compatibility. You could then also look at turning WINE into a compatibility layer for the same functions and have a lot of other software work similarly.
Re:Writing an OS in Rust: Advanced Paging by jcranmer on Monday January 28, 2019 @11:59AM (#19019015)
You pretty much have to have a POSIX compatibility layer just to support stuff without resorting to VMs.

That said, there is a lot of room to innovate in OS/userspace boundaries that don't rely on POSIX APIs--see epoll/kqueue/iocp for one place where this innovation already occurred. I'd love to see better alternatives to POSIX signals, for example. So an OS that treats POSIX as a mere compatibility layer and not the primary driver of its design could be welcome.

Re:Writing an OS in Rust: Advanced Paging by matachuan on Monday January 28, 2019 @12:34PM (#19019291)
See ATC'13 How to Run POSIX Apps in a Minimal Picoprocess (https://www.usenix.org/system/files/conference/atc13/atc13-h...). I would say it's a POSIX emulator OS.
Re:Writing an OS in Rust: Advanced Paging by Solar19 on Monday January 28, 2019 @02:09PM (#19020157)
This was the research that led to WSL.
Re:Writing an OS in Rust: Advanced Paging by pjmlp on Monday January 28, 2019 @03:26PM (#19020762)
Windows is not admitting defeat as such, rather taking advantage of those unhappy Apple customers that just want a POSIX shell and don't care about writing Objective-C and Swift based software, the actual customer base Apple cares about.
Re:Writing an OS in Rust: Advanced Paging by int_19h on Monday January 28, 2019 @10:22PM (#19023439)
WSL is more of an emulator though - it's isolated in its own box, and the rest of Windows doesn't see the POSIX view of the world. If you're writing a library, and you want it to be used on Win32, you can't assume POSIX.