FreeBSD and MacOS
Chris Zumbrunn
chris at zumbrunn.com
Thu Jul 1 00:10:40 PDT 2004
On 1. Jul 2004, at 8:33, Q wrote:
>
> On 30/06/2004, at 4:40 PM, Chris Zumbrunn wrote:
>
>>
>> On 30. Jun 2004, at 3:01, Alasdair Lumsden wrote:
>>
>>> While Mach is derived from 4.3BSD (circa 1986~1988), there's been
>>> about
>>> 15 years worth of divergence since then. For example, FreeBSD is
>>> monolithic while Mach is more micro-kernel based. Also the driver
>>> models
>>> are quite different, eg Darwin uses IOKit (Object Oriented driver
>>> interface model).
>>
>> From Apple's webpages previewing Tiger:
>>
>> "The upgraded kernel, based on FreeBSD 5.x, provides optimised
>> resource locking for better scalability across multiple processors,
>> support for 64-bit memory pointers through the System library and
>> standards-based access control lists."
>>
>> http://www.apple.com.au/macosx/tiger/unix.html
>
> Some of the newer code in Darwin is "based on FreeBSD 5.x" yes, but
> the monolithic FreeBSD kernel (as a whole) is not one of them. Instead
> apple has targeted the "interesting" bits and imported these pieces of
> the kernel as discrete components into Darwin (they are implemented
> this way anyway).
>
> Darwin still uses a Mach kernel design, although Apple has made some
> significant modifications to its implementation to reduce message
> passing overhead and latency etc, making it something of a hybrid and
> no longer a pure micro-kernel. As a result the Darwin Mach kernel is
> not the traditional Mach mix of userspace/kernelspace RPC connected
> components, instead the kernel is linked into a single address space,
> using kernel extensions (loadable modules) in a similar way FreeBSD
> does. However these extensions are implemented using a highly object
> oriented API (IOKit) for interacting with the kernel, instead of the
> traditional struct passing procedural approach used in FreeBSD.
>
> The portions of the FreeBSD kernel that Apple have adopted can be
> found as part of the XNU project (the darwin kernel) from Apple's
> Opensource website
> http://www.opensource.apple.com/darwinsource/
> The CVS tags should still be intact on the files in question.
>
> While FreeBSD provides a sizable chunk of Darwin's BSDness, it still
> has a decent amount of legacy NeXT/BSD code in it as well.
>
> Some of the things that have been adopted from FreeBSD/NetBSD in the
> Darwin kernel include:
>
> Crypto support
> Filesystem support for CD9660, DEVFS, NFS, VFS, MEMDEV (Curiously this
> doesn't include UFS/FFS support)
> IP & IPV6 TCP stack support including BPF & IPFW
> Most of the BSD/Posix/SYSV system calls (sysctl, fork, exec, ktrace,
> mmap, etc) and corresponding MAN pages.
So, Apple's statement is a bit misleading. It's the "kernel upgrades"
and not the "upgraded kernel" that is/are based on FreeBSD 5.x. :-)
Chris
More information about the freebsd-hackers
mailing list