Originally posted by: drag
Maybe I am out of step here but this is what I've read. Maybe I misunderstand.
XNU's BSD component uses FreeBSD as the primary reference codebase (although some code might be traced to other BSDs). Darwin 7.x (Mac OS X 10.3.x) uses FreeBSD 5.x. As mentioned before, BSD runs not as an external (or user-level) server, but is part of the kernel itself. Some aspects that BSD is responsible for include:
* process model
* user ids, permissions, basic security policies
* POSIX API, BSD style system calls
* TCP/IP stack, BSD sockets, firewall
* VFS and filesystems (see Mac OS X Filesystems for details)
* System V IPC
* crypto framework
* various synchronization mechanisms
Note that XNU has a unified buffer cache but it ties in to Mach's VM.
XNU uses a synchronization abstraction (built on top of Mach mutexes) called funnels to serialize access to the BSD portion of the kernel. The kernel variables pointing to these funnels have the _flock suffix, such as kernel_flock and network_flock. When Mach initializes the BSD subsystem via a call to bsd_init(), the first operation performed is the allocation of funnels (the kernel funnel's state is set to TRUE). Thereafter*snip*
I don't think I fully understand that. 😛
Everything I had read previously said it was a modified mach kernel with FreeBSD userland. I guess the only way to know for sure is to dig through the src. 😉