3 ms·
XNU 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 th
by justsid 12y ago
XNU 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.