4 ms·
Isn't Mac based upon freebsd? I've never used freebsd itself, so I'm not sure what the actual difference is besides ux.
by huh_lost_email 7y ago
Isn't Mac based upon freebsd? I've never used freebsd itself, so I'm not sure what the actual difference is besides ux.
- otterley 7y agoNot really. The roots of OS X/MacOS are in NeXTSTEP. It uses a Mach microkernel that originated at CMU, as opposed to the FreeBSD kernel (or anything like it, really). That said, a bunch of FreeBSD userland code and utilities were ported over to make the OS POSIX-ish. It's probably easiest to think of a Mac as an amalgam of many different influences and operating behaviors, as opposed to a direct descendant of any one particular lineage.
- icodestuff 7y agoThis is about right, and it's changed to be more this way over time. Early versions of OS X had user lands which were more BSD-like than they are now (and optional! Used to be you had to install the "BSD Subsystem" package from your install CD if you wanted to get a proper POSIX environment). For instance, early versions used BSD init, but that was replaced with launchd.
- danieldk 7y agoEarly versions of OS X had user lands which were more BSD-like than they are now They still have a lot of userland BSD parts. Including the very broken grep from FreeBSD (which is fixed in FreeBSD now IIRC): $ echo "abcdef" | /usr/bin/grep -o "^..." abc def (I have to use the full path to grep, because I replace macOS grep by GNU grep.)
- JdeBP 7y agoPeople really should complain to Apple about this. * https://unix.stackexchange.com/a/398249/5132 https://unix.stackexchange.com/a/398249/5132
- sardon 7y agoThe Darwin kernel in OSX has more than userland code taken from FreeBSD. "The kernel of Darwin is XNU, a hybrid kernel which uses OSFMK (Open Software Foundation Mach Kernel) from the OSF, various elements of FreeBSD (including the process model, network stack, and virtual file system)" [0] [0] https://en.wikipedia.org/wiki/Darwin_%28operating_system%29 https://en.wikipedia.org/wiki/Darwin_%28operating_system%29
- pjmlp 7y agoThat was more true in the past. https://www.amazon.com/Mac-OS-Internals-Approach-paperback/dp/0134426541 https://www.amazon.com/Mac-OS-Internals-Approach-paperback/d... https://www.amazon.com/Mac-OS-iOS-Internals-Apples/dp/1118057651 https://www.amazon.com/Mac-OS-iOS-Internals-Apples/dp/111805...
- danieldk 7y agoCould you explain this in more detail? It seems that the network stack, VFS, etc. from BSD are still heavily used? https://github.com/apple/darwin-xnu/tree/master/bsd https://github.com/apple/darwin-xnu/tree/master/bsd Also, more recently they imported pf from OpenBSD: https://github.com/apple/darwin-xnu/blob/master/bsd/net/pf.c https://github.com/apple/darwin-xnu/blob/master/bsd/net/pf.c Or do you mean that they have recently taken more code from other BSDs than FreeBSD?
- pjmlp 7y agoI mean that they have been moving away into more macOS specific code. The POSIX network stack for example, is now deprecated, and one must use Network.framework for the more up to date features, "Introducing Network.framework: A modern alternative to Sockets" https://developer.apple.com/videos/play/wwdc2018/715/ https://developer.apple.com/videos/play/wwdc2018/715/ "Optimizing Your App for Today’s Internet" https://developer.apple.com/videos/play/wwdc2018/714/ https://developer.apple.com/videos/play/wwdc2018/714/ Likewise the long term roadmap introduced in Catalina plans to turn macOS into a micro-kernel, by moving all kernel extensions into userspace drivers.
- heavyset_go 7y ago> It uses a Mach microkernel that originated at CMU, The macOS kernel is derived from what Apple chooses to release as XNU, which is Mach-ish.
- keyle 7y agoDarwinBSD was/is the base of MacOS but many will argue that it is its own `thing` now.
- jki275 7y agoDarwin is just a name for macOS / OSX. They're the same thing. There may be confusion due to the fact that Apple used to publish a Darwin iso that you could boot on their ppc machines, but that's been a long time and OSX is still Darwin. If you run uname on a mac it will tell you that it's Darwin.
- znpy 7y agothis is a common misconception. no, it's not.