bzt wrote:
I'd like to disagree. Windows is not POSIX at all, it is using its own executable format, therefore it's not the closest.
That's exactly my point: Windows and Linux are completely different, yet Windows implements most of the Linux API (branded as Windows Subsystem for Linux, WSL) and is only rivaled by FreeBSD (and maybe managarm
) in this regard.
bzt wrote:
FreeBSD does not have a Linux subsystem btw. The executable format, the dynamic linker, the libc functions etc. all are the same, the only difference is different syscall numbering. So to execute a Linux binary under BSD, all you need is a different syscall lookup table, there's absolutely no need for another subsystem.
https://www.bsdcan.org/2018/schedule/track/Hacking/976.en.htmlFor FreeBSD, I was referring to linuxkpi, which is a FreeBSD kernel subsystem that mimics Linux' in-kernel ABI and allows Linux drivers (in particular, DRM drivers) to run in the FreeBSD kernel.
bzt wrote:
And I still think following POSIX blindly kills creativity. Yes, there's a limited freedom in the way how you implement POSIX, but not how you think about the whole OS abstraction.
I agree with bzt that following POSIX
blindly is a horrible idea. But that is true for any existing standard. I do think that your examples about VMS etc. make a lot of sense and show that POSIX is not the pinnacle of good design.
glauxosdever wrote:
That also works; but then the usual software that assumes POSIX won't use your asynchronous APIs (which are probably more efficient than synchronous POSIX ones). My point is, one of the reasons for me not to do a POSIX system is that software would be designed specifically around my OS API and would be better optimised for it. Also, I would like to avoid having the need to port not-the-best quality software like GTK or gcc because users naturally expect it (where "naturally" is meant as a "natural progression from 'just POSIX' to 'the full ecosystem' "). But, given from that you emulate a lot of Linux, I can conclude it's one of your goals, and it's totally fine.
Implementing a POSIX subsystem does not mean that I can never write native apps -- it just means I can also run existing apps.
It's as simple as that.
The time required to support POSIX is not huge compared to the time required to build a stable core system. In managarm, the POSIX emulation is barely 10k SloC, compared to 30k in the kernel and drivers.
glauxosdever wrote:
Actually, I'm still undecided. Maybe I could do a POSIX system after all due to having a limited amount of time (no time for experimenting with APIs, languages, compilers and build systems). And I would actually like to do some OS development already, even if the end result is somewhat bad. But then again, I don't know.
Producing something is always better than producing nothing (regardless whether that means producing a POSIX-compatible or a POSIX-incompatible OS). I really do believe that the perfect is the enemy of the good.