PDA

View Full Version : FreeBSD Kernel




dailo
Mar 29, 2006, 08:43 PM
I know Mac OS is based off free bsd, but is it the same? I'm taking a operating system class and I need to communicate with FreeBSD kernel and etc. Do I need to install FreeBSD seperately? Thanks.



ravenvii
Mar 29, 2006, 09:05 PM
I know Mac OS is based off free bsd, but is it the same? I'm taking a operating system class and I need to communicate with FreeBSD kernel and etc. Do I need to install FreeBSD seperately? Thanks.

There are alots of similarities, but the kernel isn't the same, as far as I know. I don't know what kernel BSD uses, but OS X uses the Mach kernel.

iMeowbot
Mar 29, 2006, 09:20 PM
I know Mac OS is based off free bsd, but is it the same?
No, it is a different kernel. OS X isn't really based on FreeBSD, although it does share many programs and libraries (as do many other operating systems).
I'm taking a operating system class and I need to communicate with FreeBSD kernel and etc. Do I need to install FreeBSD seperately? Thanks.
Possibly. If you mean that you need to communicate directly with the kernel (say, to play with device drivers and such), you will want to load it onto a PC.

There is no PowerPC version of FreeBSD, and the last time I checked it didn't have an EFI boot loader for x86, so you probably aren't going to get this running on a Mac.

dailo
Mar 29, 2006, 09:23 PM
Bummer. I have an Intel Mac and there isn't and virtual pc doesn't work for it, so I can't even do that! Guess I'm stuck, thanks.

caveman_uk
Mar 30, 2006, 01:44 AM
IIRC Mac OS uses a completely different kernel to FreeBSD - it's a heavily modified Mach microkernel derivative and FreeBSD's is a traditional Unix monolithic kernel. Mac OS does use the 'user-land' from BSD that runs on top of the kernel. The user-land layer is the Unix-y bit i.e. shells etc that run in a less-priviledged mode on the CPU than the kernel. Mac OS X also uses BSD's virtual file system and networking stack code.

I've used FreeBSD on x86 in the past and I always liked it rather more than Linux. FreeBSD always felt more 'solid' to me. If you need to run FreeBSD just get an old x86 PC and run it on that. You won't need anything special. In fact something a bit older would be easier to get running from a hardware support point of view.

munkees
Mar 30, 2006, 04:03 AM
If you communicating with the server, you could still use you MacOS because most of the interface are based on standards such as BSD and posix. That why porting code from BSD to linux or solaris is not difficult.

demallien
Mar 30, 2006, 04:29 AM
Bummer. I have an Intel Mac and there isn't and virtual pc doesn't work for it, so I can't even do that! Guess I'm stuck, thanks.

Have you tried Q / Qemu? I'm not sure, but I think those compile for Intel now. And best of all, it's free.

http://www.kberg.ch/q/

mrichmon
Mar 30, 2006, 09:26 AM
IIRC Mac OS uses a completely different kernel to FreeBSD - it's a heavily modified Mach microkernel derivative and FreeBSD's is a traditional Unix monolithic kernel. Mac OS does use the 'user-land' from BSD that runs on top of the kernel. The user-land layer is the Unix-y bit i.e. shells etc that run in a less-priviledged mode on the CPU than the kernel. Mac OS X also uses BSD's virtual file system and networking stack code.


On a traditional BSD system the BSD kernel runs on top of the bare hardware.

In OS X, the Mach microkernel runs on top of the bare hardware and provides basic services such as process management, interprocess communication and memory management. On top of this Mach layer is a heavily modified BSD kernel - modified so that this kernel calls the Mach layer to to basic operations. The main thing is that the BSD kernel layer presents the standard BSD APIs up to user space.

If the original poster only needs to perform system calls and rely on some BSD kernel services (such as IPC) then they should have no problems doing this work on OS X. (Remembering that they should at least do some testing on a BSD machine before submitting any assignment code.)