Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2007 10:19:03 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        cokane@cokane.org
Cc:        freebsd-hackers@freebsd.org, Mike Meyer <mwm-keyword-freebsdhackers2.e313df@mired.org>
Subject:   Re: Mac OS underlying FreeBSD - does it run Linux emulation?
Message-ID:  <20070405101628.N1092@fledge.watson.org>
In-Reply-To: <346a80220704041047m210eb788h4f1d9aebcde3e99e@mail.gmail.com>
References:  <20070404130249.GA41671@kukulies.org> <17939.44784.420806.421633@bhuda.mired.org> <20070404153559.Y18288@fledge.watson.org> <346a80220704041047m210eb788h4f1d9aebcde3e99e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 4 Apr 2007, Coleman Kane wrote:

>> While it's true you can't run Linux binaries on Mac OS X, it's not for the 
>> reason you're suggesting, and your statement regarding FreeBSD kernel code 
>> in Mac OS X is simply incorrect.  The Mac OS X kernel, XNU, contains 
>> significant quantities of FreeBSD kernel source code, including a 
>> FreeBSD-derived VFS and network stack.  Other parts of the kernel, such as 
>> the scheduler and VM system, are derived from Mach.  While the 
>> FreeBSD-derived code has been significantly modified since it was 
>> originally forked, a lot of code moves backward and forward between the 
>> platforms: the FreeBSD audit subsystem is derived from the Mac OS X audit 
>> subsystem, and Mac OS X's smbfs and MAC Framework support are derived from 
>> FreeBSD.
>
> In addition to this, there have been examples of the Linux kernel hosted by 
> Mach in the past (such as MkLinux). From my understanding, the only thing 
> that prevents this from being realized is that nobody has sat down to 
> actually write/port the code to do it.

I'm not familiar with the structural layout of MkLinux, but I would caution 
those looking at XNU to be aware that the kernel is a monolothic kernel, in 
which the BSD and IOKit parts run directly in the kernel address space managed 
by Mach, and not as tasks over Mach.  If MkLinux runs Linux in a task under 
the microkernel, then the structures are quite different.  Mach provides quite 
nice interfaces for implementation virtualization services, however, as Mach 
VM, thread, and task interfaces give applications a lot of control in setting 
up memory and trap handling -- much more so than the UNIX equivilents.

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070405101628.N1092>