4 ms·
FreeBSD + Mach kernel, libdispatch, and launchd? How does this differ from Darwin?
by cpeterso 11y ago
FreeBSD + Mach kernel, libdispatch, and launchd? How does this differ from Darwin?
- kitsunesoba 11y agoI may be misunderstanding, but as far as I know it simply layers Mach kernel services onto the FreeBSD kernel rather than actually using Mach.
- vezzy-fnord 11y agoCorrect. There's an OSF Mach shim running as a FreeBSD kernel module which is then used to drive XPC and everything above. That said, I feel rather uneasy about the base FreeBSD going such a verbatim OS X route. I can understand doing it for FreeNAS, PC-BSD and derivatives, but it's quite invasive for upstream. Especially considering this requires running a parallel Mach kernel in the same address space. Also, using Mach IPC deliberately in 2015 is like shooting yourself in the foot in my mind, but it's probably better than kdbus.
- X-Istence 11y agoThe base FreeBSD isn't going this route, this is something that is being worked on at iXsystems that may or may not eventually find it's way to FreeBSD itself. That's my understanding from the presentation!
- erikarn 11y agoThere's no parallel Mach kernel running. It's just Mach IPC shimmed as an FD type.
- vezzy-fnord 11y agoIt's a kernel module implementation of much of OSF Mach verbatim copied and shimmed from MkLinux, not just IPC. See sys/compat/mach in the NextBSD source tree.
- erikarn 11y agoYeah I looked; it's the IPC from Mach with some shimmed bits to do VM-y things for mapped message passing. Mach was mostly VM and IPC - so of course it looks like it's a lot of Mach code. But there's no separate mach kernel running - it's just the IPC instances and they only exist as FD bits. It's not a complete kernel and FreeBSD isn't running "on" mach.
- vezzy-fnord 11y agoI never made such a claim that FreeBSD is running on Mach. I said it integrated a Mach kernel interface as a module running in kernel space. They also ported tasks (as processes), threads (kthreads) and some clock/timer stuff, as well. No memory objects because there's no external pager they can be backed from.
- tossanextbsd 11y agoIt's just a FreeBSD kernel. Kip's implemented Mach facilities on FreeBSD, but it's not remotely like Darwin. Darwin is a Mach (micro-)kernel that implements BSD APIs on top of Mach.
- natermer 11y agoIf Darwin uses a Microkernel then so does Microsoft Windows. They are very similar designs. In case you are wondering: I don't think that Microsoft Windows uses a microkernel. Some versions of Mach are micro, other versions are not. OS X doesn't use a microkernel, neither does Darwin. They use XNU kernel. XNU has code from Mach and it also uses code from FreeBSD. People call it a 'hybrid kernel', but I think that is a misnomer and only really exists through the effectiveness of Apple's marketing. XNU is a monolithic kernel with message passing capabilities inspired from microkernels. Makes it so they can isolate certain features and drivers better then, say, Linux can. Unlike Apple, Microsoft actually did release a version of NT that was a true microkernel, but they quickly realized that it is not a practical approach to creating a OS that was competitive with Unix. Regardless... This seems pretty much Darwin grafted with FreeBSD. For a commercial network appliance device it's probably a good approach. They get all the benefits from using source code from Apple, FreeBSD, and ZFS without having to actually provide much source code in the way of real improvements that could be used to enhance a competitor's product.
- Maarten88 11y ago> Microsoft actually did release a version of NT that was a true microkernel, You mean Windows NT 3.1 and 3.5, right? I used those intensively, and it worked really well. > but they quickly realized that it is not a practical approach.. With Windows NT 4.0 they left the original design and moved everything including the graphics into the kernel. But that was not because the original approach was not practical or did not work. It was because Windows 95. The wanted Win32 to be API compatible with that crap (desktop 'gadgets' and such) and that's why they did it. I remember hating NT 4.0 because it was so much less stable than the original versions.
- 11y ago