6 ms·
Native POSIX is incompatible with good APIs. Just look at the mess you need to go through to ensure data is actually written to disk. More importantly, what is
by yyyk 3y ago
Native POSIX is incompatible with good APIs. Just look at the mess you need to go through to ensure data is actually written to disk.
More importantly, what is the point of a new OS if you support just POSIX? The architecture choices involved will push the OS to be a worse Linux/BSD/Mac, and whatever new thing you add will eventually be ported to Linux. Nowadays, a new OS can only be technically justified by trying to be better than POSIX.
It is true that POSIX emulation might be useful, Microsoft showed one way to do so. A new OS could use its equivalent of WSL2/Fuschia's starnix/wine. But I don't think there are any circumstance when it is a good idea for a new kernel to natively support POSIX.
- surajrmal 3y agoposix isn't a kernel API. It is a runtime that can largely be implemented in userspace. There is no need for any kernel to do anything specific to support posix other than for possible performance optimizations. Also posix isn't even the API people target anymore - the Linux uapi is. This is why wsl and starnix target that instead. There are security issues that come along with such APIs, but you can sandbox things in such a way that it need not be as problematic. There is no getting away from the need for backwards compatibility with existing applications. Applications won't start supporting your platform natively until it matters and getting big enough to matter requires lots of software working on your platform.
- yyyk 3y agoHowever, the userspace assumptions leak. e.g. POSIX's file API don't sit quite well with Windows, and Microsoft had to eventually abandon WSL1. My point was that we really don't need yet another Unix clone. If we're going for a new OS, we should fix the core APIs as well. Emulation ain't bad per se, but it better be done 'outside' without compromising the original design.