Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Similar situation for *BSD on the iPhone/iPad/iPod touch, it is a golden age for Unix/Linux but, like you say, invisible to the end-user.


Apple's devices are based on Mach which has a different kernel than BSD. Though it does use some BSD code it's not accurate to call it *BSD.


There's more to iOS/OSX Unix than the kernel.

The Darwin portion is for most intents and purposes based on BSD -- particularly FreeBSD-- running on top of XNU (a hybrid Mach 3.0 microkernel with big chunks of the monolithic BSD kernel embedded).

http://en.wikipedia.org/wiki/Darwin_(operating_system)#Kerne...

Concerning the BSD portions, see this from Apple's Kernel docs: http://goo.gl/1sp69

"Integrated with Darwin is a customized version of the Berkeley Software Distribution (BSD) operating system. Darwin’s implementation of BSD includes much of the POSIX API, which higher-level apps can also use to implement basic app features. BSD serves as the basis for the file systems and networking facilities of OS X. In addition, it provides several programming interfaces and services, including: The process model (process IDs, signals, and so on); Basic security policies such as file permissions and user and group IDs; Threading support (POSIX threads); Networking support (BSD sockets)"

That accounts for an immense amount of what a kernel normally does.

Besides, I have never met a NeXT or Apple employee that didn't consider Darwin to be BSD.

It's a radically modified BSD but I think it's still a descendant.


iOS ships the darwin libc. Does it use any other major components? I'm pretty sure I remember there being no unix userspace available on iOS. Note that the stuff you quote are kernel features. And again, it's really not a BSD kernel; it has BSD roots, but they're back in the 1980's. There's no relationship between the existing projects and the Free/OpenBSD open source work.


I'm pretty sure I remember there being no unix userspace available on iOS.

Not exposed to standard users, no.

There's no relationship between the existing projects and the Free/OpenBSD open source work.

That's simply not true. There's more to the BSDs than just the kernel – all of the userland stuff is incredibly important to Apple, especially as they try to further distance themselves from the GPL. There is a relatively strong relationship between the BSDs and OS X/iOS. It's true, the lower you get, the bigger the differences, but even xnu has some relatively current BSD sources. e.g. from OpenBSD:

http://opensource.apple.com/source/xnu/xnu-2050.7.9/bsd/net/...


The last time Darwin was synced with FreeBSD was FreeBSD 5, at which point the features available in FreeBSD 5 were also made available in Darwin, such as kqueue and various other API's.

I, and some other developers I know, have been hoping that Apple in the future will sync with FreeBSD again in the future, hopefully against FreeBSD 10 to get even more feature parity in kernel interfaces available.

There is a lot of a relationship between Darwin and the FreeBSD team. Apple's firewall import from OpenBSD (pf) for example was also used by the FreeBSD team to update their port.

Just because it is not visible on the surface doesn't mean the relationship doesn't exist ...


Was "darwin libc" copied from somewhere? Maybe a BSD project? Check your facts.


The kernel is a drop-in replacement for a BSD kernel, so the OS is still BSD.


Does Apple contribute back to BSD on any meaningful level?


Not anywhere as much as they should. A few things I do know of:

Clang/LLVM (which has substantial support from Apple) will be the primary compiler for FreeBSD.

Apple's Grand Central Dispatch (libdispatch) has been ported to FreeBSD.

http://en.wikipedia.org/wiki/Grand_Central_Dispatch

The TrustedBSD Security Event Auditing and OpenBSM are based on the Mac OS X BSM audit implementation and donated by Apple.

As well, CUPS has been ported to FreeBSD.


>As well, CUPS has been ported to FreeBSD.

Well CUPS did not originate with Apple, they bought it when they needed a mature printing system. It existed for BSD prior to Apple's purchase.

I don't know if the BSD's have made any use of anything from Apple's Darwin release? Perhaps it's not possible due to the licencing (Apple Public Source Licence) which is copyleft'ish.


There is quite a bit of sharing between Apple and FreeBSD. For example libdispatch has been ported to FreeBSD. Also when Apple imported pf into Darwin; FreeBSD used that same port to update their port of pf from OpenBSD.

As others have mentioned, stuff like the TrustedBSD and Audit framework came from Darwin, and features such as Seatbelt and sandboxes are slowly being considered or improved upon by Capsicum for example.


Define 'contribute back'. I tend to think of Darwin as being a fork of BSD, so in that sense Apple doesn't commit back into BSD source repositories. But Darwin is open source, so the BSD community is free to take any ideas that please them.


AFAIK Darwin is licenced under Apple's APSL which is copyleft-based so it's likely the BSD's can't lift code from Darwin.

There was OpenDarwin though, which the developers shut down due to lack of interest and other problems. Now there's PureDarwin but development seems very slow.


BSD is a funny beast in that almost know one is required to contribute anything except a license attribution in their code. Apple doesn't contribute anything to BSD because you really can't, there is no one to answer to. All you can do is stamp the license on your code and other BSD forks may use it.


Do you know whether that has helped or hindered other BSD based OSes?


Apple have sponsored some major useful things that the BSDs now use e.g. LLVM/Clang.


It has exposed a lot of people to BSD Unix, which I think helped some.

But outside of developers and hackers, most people have so little exposure to the Unix side of MacOS X (and practically none on iOS) that it wasn't as big an impact as some of us (unrealistically?) hoped.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: