Date: Wed, 4 Feb 2004 16:03:59 -0500 From: Charles Swiger <cswiger@mac.com> To: Lucas Holt <luke@foolishgames.com> Cc: "freebsd-questions@FreeBSD. ORG" <freebsd-questions@freebsd.org> Subject: Re: PPC ver of freeBSD ? isent that the main body of os X Message-ID: <A7596668-5755-11D8-8AE0-003065ABFD92@mac.com> In-Reply-To: <6E8F26D6-574D-11D8-BF57-000A95EFF4CA@foolishgames.com> References: <4020B667.8070809@sonic.net> <393AF58A-5727-11D8-B1AE-000A95EFF4CA@foolishgames.com> <E78F0C32-5739-11D8-8AE0-003065ABFD92@mac.com> <6E8F26D6-574D-11D8-BF57-000A95EFF4CA@foolishgames.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 4, 2004, at 3:05 PM, Lucas Holt wrote: >> MacOS X is using a monolithic kernel which derives from between the >> CMU Mach project v2.0 and v2.5 circa 1990, which was Avie Tenavian's >> grad project at CMU. Apple is not using the Mach 3.0 microkernel, >> nor is it using "half of the FreeBSD 5 kernel". > > Incorrect! The original OS X code base does come from next but apple > has upgraded the code in 10.3 to use FreeBSD 5.0 code. > apple.com/macosx even mentioned that when panther was released. > Another document on apple's site i'm looking for again specified that > the latest 10.3 kernel was in fact using only the messaging and memory > architecture of Mach and the rest was in fact FreeBSD 5.0 code! > > http://developer.apple.com/darwin/history.html This page isn't wrong, and I believe that the OS X kernel does include some FreeBSD 5 code, just as OS X's userland includes some FreeBSD and some NetBSD-derived programs. However, let's consider some real data: 8-base# ident /bin/* /sbin/* /usr/bin/* /usr/sbin/* 2> /dev/null | fgrep '$FreeBSD:' | wc -l 138 9-base# ident /bin/* /sbin/* /usr/bin/* /usr/sbin/* 2> /dev/null | fgrep '$NetBSD:' | wc -l 281 10-base# ident /bin/* /sbin/* /usr/bin/* /usr/sbin/* 2> /dev/null | fgrep '$Id:' | wc -l 1403 11-base# uname -a Darwin base.codefab.com 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC Power Macintosh powerpc 1-tanya# ident /bin/* /sbin/* /usr/bin/* /usr/sbin/* 2> /dev/null | fgrep '$FreeBSD:' | wc -l 258 2-tanya# ident /bin/* /sbin/* /usr/bin/* /usr/sbin/* 2> /dev/null | fgrep '$NetBSD:' | wc -l 143 3-tanya# ident /bin/* /sbin/* /usr/bin/* /usr/sbin/* 2> /dev/null | fgrep '$Id:' | wc -l 898 4-tanya# uname -a Darwin tanya 7.2.0 Darwin Kernel Version 7.2.0: Thu Dec 11 16:20:23 PST 2003; root:xnu/xnu-517.3.7.obj~1/RELEASE_PPC Power Macintosh powerpc So much for userland; shall we consider the kernel, as well? First, CMU largely stopped work on Mach by the end of 1993 and the Mach 3 microkernel was largely developed by U/Utah and the OSF, some of which became Flex and Flux, if memory serves. Neither FreeBSD nor Apple uses a microkernel, largely because the performance hit for context switching between kernel and userspace all of the time is so extreme for a true microkernel architecture. While neither of the two kernels is monolithic, and they support dynamic loading of kernel extensions, device drivers reside in kernel space, networking is in kernel space, filesystem management (the vnode/VFS abstraction) is in kernel space. A true microkernel would have those in userspace and would have nothing beyond a scheduler, VM, and basic thread/task management. Apple did incorporate KAME's IPv6 code, IPFW, and the sysctl MIB infrastructure from BSD, and they are offering various POSIX API's like pthreads, but POSIX threads itself largely derives from Mach's thread model and the Cthreads interface dating back to NEXTSTEP 2.x or earlier. Apple's IOKit depends on Mach and CoreFoundation, and uses Mach primitives and abstractions which are quite distinct from BSD-style device drivers. Take a look at the xnu sources, or how kernel extensions and device drivers are implemented under /Developer/Examples/IOKit. -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A7596668-5755-11D8-8AE0-003065ABFD92>