5 ms·
You might need that when you want to reimplement Linux, the Joyent team did that on their OS (derived from solaris) so that user can run linux binaries on a sol
by Manozco 9y ago
You might need that when you want to reimplement Linux, the Joyent team did that on their OS (derived from solaris) so that user can run linux binaries on a solaris kernel (so thay have dtrace, zfs, mdb, ...) Bryan Cantrill did a bunch of conferences on that (one here: https://youtu.be/TrfD3pC0VSs https://youtu.be/TrfD3pC0VSs)
The idea behind is that Linux is only a list of syscalls, if you are able to reimplement them, you reimplement linux, you don't need anything else. On the contrary if you want to reimplement a BSD you need to reimplement their libc (and perhaps some other libraries)
- yjftsjthsd-h 9y agoFor that matter, this is how Widows's Linux compatibility layer works.
- int_19h 9y ago> On the contrary if you want to reimplement a BSD you need to reimplement their libc (and perhaps some other libraries) To clarify, what you're saying is that in BSD land, the syscall API is not considered stable, but libc is?
- Manozco 9y agoI'm not ultra familiar with the topic so if someone wants to correct me please do but : - Linux has always been described as just a kernel, which translates as just a syscall table. The fact that this table is stable or not is not relevant here. - *BSD on the other hand are shipping a kernel plus a lot of libraries/binaries, if you want to simulate a BSD system, you have to expose those libraries/binaries. It's not so much a technical difference, it's more of a different approach to OS development (kernel space vs kernel/user space).
- int_19h 9y agoThing is, if syscalls in BSD are considered stable the way they are in Linux, then you could just ship your own kernel with BSD's libc. But if they consider it an internal API between kernel and libc, and apps are only ever supposed to depend on libc, then of course that doesn't work. So stability of syscall API is the de facto differentiating factor here. It sounds like Microsoft couldn't do "Windows Subsystem for BSD" the way it did WSL, for example.