4 ms·
Darwin uses a Mach kernel. However, the POSIX interface inter-process communication, network infrastructure, et al. are from BSD.
by Q6T46nT668w6i3m 12y ago
Darwin uses a Mach kernel. However, the POSIX interface inter-process communication, network infrastructure, et al. are from BSD.
- justsid 12y agoXNU really is a hybrid kernel. On the top level you see mostly FreeBSD which as you say brings in the VFS, networking, most of the userland and lots of other things you see in a POSIX conforming kernel. However, many things are actually nothing more than just shims down into the Mach part of the kernel, which brings the virtual memory, processes, thread model and other “low level” stuff. Processes for example can be worked with as if they were a FreeBSD flavoured process, but that will just call down into a shim which calls down into Mach. You can however also work with processes the Mach style, eg. through ports and mach_msg.
- dietrichepp 12y agoAs an illustration, there was a program which would crash the system (kernel panic) by using Mach interfaces to create a new thread, and then have that thread use standard Unix interfaces. Apparently, the shims were not properly initialized.