5 ms·
Well the importance of the kernel on application performance is often over-estimated, especially for non-server software. xnu is a hybrid of Mach and FreeBSD.
by ridiculous_fish 8y ago
Well the importance of the kernel on application performance is often over-estimated, especially for non-server software.
xnu is a hybrid of Mach and FreeBSD. To be super-concrete, it has both sets of syscalls, with Mach syscalls as negative integers, and BSD syscalls as positive integers. A given running executable has a dual existence as both a BSD pid_t and a Mach task_t. At one point it was even possible to have a Mach task without a pid.
Most executed syscalls are BSD: read, write, select, getpid, etc. However Mach still plays a role in the VM system (`vm_copy`, etc.) and crucially via the IPC workhorse `mach_msg`.
It's hard to overstate the importance of mach_msg. It underlies the great macOS IPC primitives: xpc, notify(3), etc. Linux looks anemic by comparison with its limited pipes, creaky SysV sendmsg(), and DBus (hope you never have to use it). But it also appears that Apple is preparing to drop Mach: mach_msg / MIG is buried, xpc is conspicuously designed to be separable from Mach, etc.
- ksec 8y ago>But it also appears that Apple is preparing to drop Mach: mach_msg / MIG is buried, xpc is conspicuously designed to be separable from Mach, etc. Why? What benefits do they have to drop it ?