Why does MacOS not use the FreeBSD kernel?

As I understand it the Apple Mac. operating system uses the Mach kernel modified into XNU, but at least some of the FreeBSD userland. Does anyone know why? Or why they don't use the FreeBSD kernel?
 
After being fired from Apple, Steve Jobs founded NeXT Computer. The NeXTSTEP operating system ran a BSD userland on top of a Mach kernel. Apple later bought NeXT, which was how Jobs wound up back at Apple. After he was promoted to CEO, it was decided to rewrite MacOS with a Unix base. I can only presume that since Apple already had the NeXTSTEP code at hand, that was a major factor in the decision. FreeBSD had a more readily maintained and up-to-date userland, and NeXTSTEP already contained a lot of the code needed to make that work with a Mach kernel.
 
Yes, I sort-of knew the history. I just wondered why bother reinventing the wheel. What has Mach got that FreeBSD doesn't?
 
I just wondered why bother reinventing the wheel.
It's not reinventing the wheel if the code already exists. But even if it didn't, there have been dozens of iterations of Unix in the past forty years, many with their own kernels. As for what Mach has that FreeBSD doesn't, you could probably write a book on that. A very dense and obscure book. :p

I believe it was the other way around. Jobs was hired back and required Apple to buy NeXT or something like that.
It seems we both missed the mark a little bit.
 
As I understand it the Apple Mac. operating system uses the Mach kernel modified into XNU, but at least some of the FreeBSD userland. Does anyone know why? Or why they don't use the FreeBSD kernel?
Yes, I sort-of knew the history. I just wondered why bother reinventing the wheel. What has Mach got that FreeBSD doesn't?

Primarily because Steve bought into the benefits of the ukernel, not knowing that Mach is probably the poorest designed microkernel ever. It's relatively secure, actually, but it's slow. It's so slow that a monolithic kernel can easily outperform it on weak hardware by a hookshot (Yes Zelda reference) and while it has plenty of nice features, you need to write code that takes advantage of these features. And AFAIK, OSF/1 aka Tru64 didn't follow this (OSF/1 uses Mach) so it's fair to say most Mach-compatible software didn't.

However, modern day XNU is a hybrid kernel, and I don't really have as much of an issue with the architecture of XNU as I do the OS X design philosophy, the way a lot of the userland is handled and that the GUI isn't really better than anything on real UNIX other than its prettiness, which when you come down to it means nothing.

FreeBSD's kernel is good but tbh the OS X to FreeBSD code commonality is probably around 10% - Darwin has most of its code from NEXTSTEP and GNU sources and most of the userland tools for FreeBSD are only superficially similar - HFS+ is an entirely different beast from UFS/FFS2.
 
Apple has been replacing whatever there is left of the GNU utilities in OS X rather aggressively with their own proprietary re-writes of the same utilities. For example take a look at the SAMBA service in the newer versions of OS X, it has nothing in common with the GNU one other than that it implements the same SMB protocol. What's really funny at least to me is that Apple's implementation beats the crap out of the GNU one in terms of compatibility with newer windowses.
 
Apple has been replacing whatever there is left of the GNU utilities in OS X rather aggressively with their own proprietary re-writes of the same utilities. For example take a look at the SAMBA service in the newer versions of OS X, it has nothing in common with the GNU one other than that it implements the same SMB protocol. What's really funny at least to me is that Apple's implementation beats the crap out of the GNU one in terms of compatibility with newer windowses.

Last version of OS X I used was Lion - and it still had GNU bash, binutils and other parts of the GNU userland.
 
At least on OS X sierra the binutils are all CLang/LLVM based:

Code:
$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-274.1
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 8.0.0, (clang-800.0.42.1)
TAPI support using: Apple TAPI version 1.30

The bash shell is going to an interesting one, they are stuck at version 3.2 from 2006 (I think) and replacing that with their own implementation or a simpler shell such as the FreeBSD sh(1) is going to be a compatibility nightmare if they ever attempt that.
 
At least on OS X sierra the binutils are all CLang/LLVM based:
No more OS X, macOS now ;)

The bash shell is going to an interesting one, they are stuck at version 3.2 from 2006 (I think) and replacing that with their own implementation or a simpler shell such as the FreeBSD sh(1) is going to be a compatibility nightmare if they ever attempt that.

I think Apple has never targetted power users, hence shipping an up to date shell is somehwere down in their priority list. The areas that macOS shines are aesthetics, ease of use and these sort of cosmetic things (kudos on them, MacbookPro is a good combination of well designed hardware + a nice looking OS).

Getting back to the topic of OP; if you look at the macOS kernel architecture below

osxarchitecture.gif


you will see that bits like networking were imported from FreeBSD, which is direct descendent of 4.4BSD-Lite. BSD networking code was one of the mature implementations of TCP/IP model in 90's I reckon and AT&T lawsuit was over by the time Apple considered looking into BSD code - no legal disputes!.

Not sure about the file system, though! As TeamBlackFox mentioned, HFS+ is something different than UFS.

History of UNIX is really fun to read. I read this book and enjoyed it really (digital edition is not more than 10 bucks), if you are interested, definitely recommend the book.
 
I think Apple has never targetted power users, hence shipping an up to date shell is somehwere down in their priority list. The areas that macOS shines are aesthetics, ease of use and these sort of cosmetic things (kudos on them, MacbookPro is a good combination of well designed hardware + a nice looking OS).

Getting back to the topic of OP; if you look at the macOS kernel architecture below

osxarchitecture.gif


you will see that bits like networking were imported from FreeBSD, which is direct descendent of 4.4BSD-Lite. BSD networking code was one of the mature implementations of TCP/IP model in 90's I reckon and AT&T lawsuit was over by the time Apple considered looking into BSD code - no legal disputes!.

Not sure about the file system, though! As TeamBlackFox mentioned, HFS+ is something different than UFS.

History of UNIX is really fun to read. I read this book and enjoyed it really (digital edition is not more than 10 bucks), if you are interested, definitely recommend the book.

macOS only has aesthetics, ease of use is a very subjective subject and since they bury any and all advanced options away from prying eyes, it's impossible for it to satisfy anyone who has an aspiration for more than the most mundane use of computers. Windows, I'll grant that they at least provide, under the hood, a full set of tools for their power users and they're easily accessible: PowerShell, the *msc programs etc. are all easily accessible. IRIX may not be aesthetically pleasing but in its case it makes everything rather easy for even poorly trained computer users, I did this as a test with my own mother, who found for a day that a default install of IRIX on my SGI Fuel was actually quite easy to use for her intended uses, email, web browsing and so-on.

As for the code-commonality with macOS, there's a few things you have to first realize. One, kernels are a small part of the overall code of the OS. So just looking at the kernel, you get a poor idea of how much BSD code is in OS X. Specifically, I'd estimate around 30% of the XNU kernel is originally BSD derived, with around 10% from FreeBSD, the reason being all of the code that came in from NeXSTEP. Which is far removed from anything we're used to. Darwin, the macOS kernel and userland minus the proprietary bits, is far removed from any modern BSD. You don't believe me? Feel free to try replacing the XNU kernel into FreeBSD or the FreeBSD kernel into Darwin, see how far you get. The kernels are entirely different.
 
macOS only has aesthetics, ease of use is a very subjective subject and since they bury any and all advanced options away from prying eyes, it's impossible for it to satisfy anyone who has an aspiration for more than the most mundane use of computers.
Yes and no...
Totally agree with that being "easy to use" is subjective. However, from Apple's perspective (not advocating anybody here) "users do not need to tweak anything, because Apple already provides what is best for you". They simply don't want the thing they sell to be hackable. This may not (and does not) satify average FreeBSD user, but totally fine for many people. Look at MacBookPro 2016 (i.e. how many connectivity ports it has, or no chance of swapping/upgrading hardware etc.)

As for the code-commonality with macOS, there's a few things you have to first realize. One, kernels are a small part of the overall code of the OS. So just looking at the kernel, you get a poor idea of how much BSD code is in OS X.
I referred the kernel architecture since the OP meantions use of FreeBSD kernel instead of XNU.
 
Exactly, the Macbook Pro is a status symbol nothing more it's nowhere near that price tag they're asking for and is only good for anyone who isn't a power user. By comparison, I got my W530, used for $500, shopped around and got a 3940XM CPU for $300, put that in there along with $70 for 32GB, and an SSD and an HDD I had lying around plus $15 for a caddy for the second HDD - and I'm already outclassing their top configuration in a few areas:

RAM (twice as much!)
All but the top CPU are slower: http://cpu.userbenchmark.com/Compare/Intel-Core-i7-6820HQ-vs-Intel-Core-i7-3940XM/m43500vsm7092
Cost! I got this baby for a total of $985 upgraded to a decked out configuration with directly disable-able Optimus, perfect FreeBSD support, and the capability to still run Windows 7 effectively as my dual boot machine.

All in all I don't think a several thousand dollar premium over the W530 are looking too good.
 
I may not be following the thread properly but my son, and everyone he knows, would disagree about Macs being for aesthetics alone. He's in the theatre as a producer and actor. Everyone he knows has a Mac laptop and they all love it and wouldn't even consider anything else. I know. I asked. In fact, he owned a Windows PC and notebooks until he went to college for theatre but was swayed into getting a Mac desktop cause he always was envious of what his colleagues could do with their Macs, not only graphics ability but the ability to connect to anything, and now he owns every Apple device except a phone (and I don't know why he doesn't).

So now he's all Apple all the time and loves it. The only concern of his is what he reads online. Nothing he ever reads online was a bother until he read about it. "Am I supposed to be worried about the lack of innovation at Apple?", he asks me. Well, I replied, if you're able to do the things you want to do then no.

Now, as far as "price premium" is concerned, until your Windows PC can plug in to a Windows PC communication device or some software and be guaranteed to work as advertised, and if it doesn't, you can walk down to the Windows PC Store to get the problem resolved, there isn't much to talk about.

Now I have never owned any Apple device except for an original iPad given to me for Christmas years ago but has everyone seen the photo of the scientists at a CERN conference a couple of years ago with a hundred or so of them and their Mac notebooks all open? Doesn't sound like they would be as concerned with aesthetics alone.
 
Here's the thing. A lot of "producers" claim an Apple is a better product because of applications like Final Cut, etc. but really I've used both Final Cut and Windows applications like Sony Vegas and they're roughly the same. Most of the same major applications are available for each and Windows has just as much capability of displaying a high res screen - in fact you can get a high res Windows laptop cheaper than a MacBook Pro.

If you're buying an Apple because it's "Guaranteed to work with everything" you're kidding yourself. I was an Apple user from '06-'13 and it wasn't any easier than owning a Windows machine. In fact because everything for Apples costs at a premium I probably wasted $10,000 through high school and college on Apple shit I could have gotten on Windows for half as much. I owned several, for the record. A PowerMac G4, a Powerbook G4, a G5, an original "MacBook" and a Retina Macbook Pro. The Retina was the saddest of them. Everything is glued into place and the SSD failed three times, the final two times Apple refused to cover it so I had to shell out for a replacement myself. And it wasn't a standard SSD. No. I had to buy either from Apple or one of their expensive "Approved third parties." Which is a load of horse shit because any other manufacturer would have a standard setup in there so you can go to any old Microcenter and buy what you need.

Going back to the "Why macOS doesn't use the FreeBSD kernel." the reason I started including the entire OS is because if you limit yourself to the view of the XNU kernel you get a poor idea of how much code macOS actually uses.
 
A lot of "producers" claim an Apple is a better product because of applications like Final Cut, etc. but really I've used both Final Cut and Windows applications like Sony Vegas and they're roughly the same.
He's not in motion pictures. He owns and runs a theare company for stage plays.

you can get a high res Windows laptop cheaper than a MacBook Pro.
As I said, when that Windows laptop has problems, who will sit with you and help you resolve it in person?

If you're buying an Apple because it's "Guaranteed to work with everything" you're kidding yourself.
You should see all the connectivity going on among the 10 people working on one of his stage plays, all using Macs. When he buys something new and plugs it into his equipment, it's on and works as expected. I can't say the same for most Windows stuff I used to buy.

His hard drive had a problem after five years of use. I walked down the street

When I worked at SGI, standard issue was a Mac (but, yeah, it's been a long time since I was there).

I have to run but any complaints about not being able to use other people's hardware means Apple loses control of that hardware which means Apple cannot provide the service and guarantees it offers and, therefore, its quality of hardware and service would degrade just as it does with Windows PCs.

For example, my wife has a brand new Lenovo laptop which upgraded to Windows 10 and now only gets 4Mb wifi downloads. You have three third parties involved. Lenovo drivers for someone else's wifi chip and Micrsoft's Windows all not working together in unison.
 
He's not in motion pictures. He owns and runs a theare company for stage plays.

Video editing software is the same regardless of your status as an stage man or what. If you're talking audio and other engineering, there's equivalent programs on the Windows machine


As I said, when that Windows laptop has problems, who will sit with you and help you resolve it in person?

You can't be talking about the Apple "Geniuses" Those morons can't 90% of their time engineer their way out of a rice paper bag. I gave my Retina Macbook to my mother after I said "Fuck this rubbish."and I took it down to the Genius Bar, made and appointment and all that to get her profile transferred off her old Macbook and get the Retina setup under her Apple ID. It took 2 hours, three geniuses and a manager to do something that normally would take me 30 mins, I just didn't want to go through it because I'm a grown man, I have work, and my own problems and I'd rather pay someone whose supposed to be trained to do that as their job. I'm reminded of this wonderful South Park video: http://southpark.cc.com/clips/382790/the-counsel-of-geniuses

You should see all the connectivity going on among the 10 people working on one of his stage plays, all using Macs. When he buys something new and plugs it into his equipment, it's on and works as expected. I can't say the same for most Windows stuff I used to buy.

His hard drive had a problem after five years of use. I walked down the street

And the same thing happens for most Windows software. I recently bought a Razer Cherry Green keyboard, a condenser microphone, and setup a SMB share on Windows Server 2016. Guess what? Everything worked just fine! You read the manual, plug it in, follow any instructions thereafter and boom, it all worked fine.

When I worked at SGI, standard issue was a Mac (but, yeah, it's been a long time since I was there).

I have to run but any complaints about not being able to use other people's hardware means Apple loses control of that hardware which means Apple cannot provide the service and guarantees it offers and, therefore, its quality of hardware and service would degrade just as it does with Windows PCs.

It's hardware has already dropped to the pits. I still have a G4 cube somewhere in storage. You open it up and everything is laid out perfectly and not a thing is out of place. Everything is put where it needs to be and there's no issue - you can remove the logic board, the CPU, the graphics card, and replace all of them without buying a new system. You can't even AFAIK open a new "trash can" Mac Pro, let alone a Macbook Pro, without special tools and nothing is upgradeable, all is glued or soldered in. And what happens when your battery fails, or your RAM dies? You need a new system, effectively because it's all FRIGGING GLUED INSIDE. You're paying thousands for techniques for building computers that only belong on bargain bin shelves.

For example, my wife has a brand new Lenovo laptop which upgraded to Windows 10 and now only gets 4Mb wifi downloads. You have three third parties involved. Lenovo drivers for someone else's wifi chip and Micrsoft's Windows all not working together in unison.

You're flawed in your analogy. Apple doesn't make half of the drivers in its OS, it uses the same drivers that everyone else uses from third party manufacturers. And it's not like there's been driver issues on Macs - oh wait there is. The Retina had a problem with the Nvidia driver that caused games under OS X to have texture distortion and tearing. Go over to the Windows bootcamp drive, and boom, game works fine. Never got fixed with Apple updates on mine, essentially breaking the experience for me. As for your wife's issue, check the card's chipset, and download the direct manufacturer's driver. That's what I do anyways when installing stuff on Windows, rather than using OEM drivers. I also reimage any new computer I buy since why the hell not.

I also don't use 8 or 10 due to backdoors installed, and macOS has them too - so you're not safe using either OS.
 
Since it's already deviated from the OP's topic, let me bring my example.
My wife loves her Macbook Air. She uses Skype much. One day (a year or so ago) her laptop installed updates and asked to reboot.
Guess what? Skype has stopped detecting the webcam! Thinking the same way as TeamBlackFox mentioned above, I emailed those "geniuses", and they replied that "Skype" is a third-party software and that's a problem of its developers!!
I searched the net and found an older version of the webcam driver, unpacked it and overwrote the new one, rebooted, and it worked again! Of course, that was a quick and dirty tweak, but what else could I do without wasting my time for their crap?..
 
Since it's already deviated from the OP's topic, let me bring my example.
My wife loves her Macbook Air. She uses Skype much. One day (a year or so ago) her laptop installed updates and asked to reboot.
Guess what? Skype has stopped detecting the webcam! Thinking the same way as TeamBlackFox mentioned above, I emailed those "geniuses", and they replied that "Skype" is a third-party software and that's a problem of its developers!!
I searched the net and found an older version of the webcam driver, unpacked it and overwrote the new one, rebooted, and it worked again! Of course, that was a quick and dirty tweak, but what else could I do without wasting my time for their crap?..
Cause Microsoft made changes. It's Microsoft's software. Apple has no control over that and you help prove my point.
 
Video editing software is the same regardless of your status as an stage man or what. If you're talking audio and other engineering, there's equivalent programs on the Windows machine




You can't be talking about the Apple "Geniuses" Those morons can't 90% of their time engineer their way out of a rice paper bag. I gave my Retina Macbook to my mother after I said "Fuck this rubbish."and I took it down to the Genius Bar, made and appointment and all that to get her profile transferred off her old Macbook and get the Retina setup under her Apple ID. It took 2 hours, three geniuses and a manager to do something that normally would take me 30 mins, I just didn't want to go through it because I'm a grown man, I have work, and my own problems and I'd rather pay someone whose supposed to be trained to do that as their job. I'm reminded of this wonderful South Park video: http://southpark.cc.com/clips/382790/the-counsel-of-geniuses



And the same thing happens for most Windows software. I recently bought a Razer Cherry Green keyboard, a condenser microphone, and setup a SMB share on Windows Server 2016. Guess what? Everything worked just fine! You read the manual, plug it in, follow any instructions thereafter and boom, it all worked fine.



It's hardware has already dropped to the pits. I still have a G4 cube somewhere in storage. You open it up and everything is laid out perfectly and not a thing is out of place. Everything is put where it needs to be and there's no issue - you can remove the logic board, the CPU, the graphics card, and replace all of them without buying a new system. You can't even AFAIK open a new "trash can" Mac Pro, let alone a Macbook Pro, without special tools and nothing is upgradeable, all is glued or soldered in. And what happens when your battery fails, or your RAM dies? You need a new system, effectively because it's all FRIGGING GLUED INSIDE. You're paying thousands for techniques for building computers that only belong on bargain bin shelves.



You're flawed in your analogy. Apple doesn't make half of the drivers in its OS, it uses the same drivers that everyone else uses from third party manufacturers. And it's not like there's been driver issues on Macs - oh wait there is. The Retina had a problem with the Nvidia driver that caused games under OS X to have texture distortion and tearing. Go over to the Windows bootcamp drive, and boom, game works fine. Never got fixed with Apple updates on mine, essentially breaking the experience for me. As for your wife's issue, check the card's chipset, and download the direct manufacturer's driver. That's what I do anyways when installing stuff on Windows, rather than using OEM drivers. I also reimage any new computer I buy since why the hell not.

I also don't use 8 or 10 due to backdoors installed, and macOS has them too - so you're not safe using either OS.
You are only proving my point about windows third party issues
 
Some time ago, but fairly recently, there were a lot of complaints from just about everywhere about Skype no longer working in Linux and other areas. It was noted that Microsoft had made changes to the software causing these problems. I don't use Skype so I don't have a need to recall those details. I'm betting it's the same as what you had.

TeamBlackFox Please mind your language. This place isn't reddit.
 
Back
Top