8 ms·
Are there are Darwin hackers lurking on HN? I would pay good money to get a brief summary of the kernel for kernel hackers such as myself who only know how thin
by ilovecaching 7y ago
Are there are Darwin hackers lurking on HN? I would pay good money to get a brief summary of the kernel for kernel hackers such as myself who only know how things work in Linux. What are the big architectural differences or cool features not in Linux? Also, how hard is it to upstream changes/get drivers in mainline?
- wrs 7y agoAmit Singh’s excellent book MacOS Internals: A Systems Approach [1] is a bit outdated now but still recommended if you’re interested in the workings of a non-Linux commercial OS. [1] https://www.amazon.com/Mac-OS-Internals-Approach-paperback/dp/0134426541 https://www.amazon.com/Mac-OS-Internals-Approach-paperback/d...
- monocasa 7y agoJonathan Levin's *OS Internals volumes are an updated version of the same info, and wonderful.
- n_t 7y agoLooks interesting and would love to read/review it. But at $88 a piece for 3 volumes ... hmm!
- Hackbraten 7y agoVolume 1 and 3 are easily worth their money, and then some. (Still waiting for my order of Vol. 2 even though it should have been released a few weeks ago.)
- svth 7y agoHere's a link to the first volume, made available on the book's website: http://newosxbook.com/MOXiI.pdf http://newosxbook.com/MOXiI.pdf
- loeg 7y agoThe Design and Implementation of the FreeBSD Operating System, 2nd ed., in the same category. https://www.amazon.com/dp/0321968972 https://www.amazon.com/dp/0321968972
- saagarjha 7y agoNot a Darwin hacker, but: > What are the big architectural differences or cool features not in Linux? Darwin is based on XNU from NeXT, which itself is comprised of OSFMK Mach microkernel but with many of the things pulled into the kernel itself for performance. A lot of the stuff with Mach tasks/ports/messages is still there. > Also, how hard is it to upstream changes/get drivers in mainline? You can write your own using IOKit but they're not going to be in the mainline tree, because Apple.
- loeg 7y ago> Darwin is based on XNU from NeXT, which itself is comprised of OSFMK Mach microkernel but with many of the things pulled into the kernel itself for performance. And amusingly, the syscall interface from FreeBSD 4 or so.
- pmjordan 7y agoIOKit is actually a considerable chunk of the kernel, particularly if you count the various "families", some of which remain open source. I'd say it's Apple's main contribution to the kernel at the architectural level. It's implemented unlike anything in BSD or Linux, as it uses C++ on the kernel side. (The user space side, IOKitUser, is written in C.) These days even Apple uses it for non-device-related kernel services - you can see what the iokit registry looks like on your system using the "ioreg" command or the IORegistryExplorer or IOJones GUI tools.
- twunde 7y agoDarwin is actually a BSD variant, so it does tend to absorb some features from the rest of the bsds such as dtrace. Darwin is nigh-impossible to get patches into as an outsider ( I vaguely remember a blog post or maybe a talk about the process). The rest of the BSDs are fairly easy to get patches into upstream/mainline.
- sigjuice 7y agoFreeBSD got dtrace in 2009 (FreeBSD 7.1). Mac OS X 10.5 already had dtrace in 2007.
- chungus_khan 7y agoThat's because dtrace is a Sun thing, and there was a brief period where Apple and Sun were planning on some very serious collaboration. There was also talk of replacing HFS+ with ZFS at the time.
- pnako 7y agoDarwin is not a thing. It's just Apple dumping the code to satisfy the licensing requirements.
- ronsor 7y agoExcept it's BSD licensed and not necessary to share the code.
- pnako 7y agoTrue. But Darwin is still not a thing :) There is no real community, bug tracker, etc. My point that it's just an Apple code dump remains valid, I think.
- kccqzy 7y agoOpen source doesn't necessarily mean open development. Companies like Apple embrace the former without the latter. It is perfectly valid to share your source code openly but not allow outsiders to do development. On a lesser scale, SQLite is another example of open source without allowing open development. You can't really contribute code to SQLite even if you wanted to. Do you think SQLite is not a thing? Heck, even RMS used to be super protective of Emacs.
- pnako 7y agoI did not say it was not open source. I said it's just a code dump, and so far you have not really proved me wrong. There is not even a proper repository with version history, as far as I can tell. Just this stuff: https://github.com/apple/darwin-xnu/commits/master https://github.com/apple/darwin-xnu/commits/master That's literally a code dump.
- jki275 7y agoApple has in the past provided a fully bootable Darwin operating system -- no Gui, but the OS worked just fine. Your argument is pedantic where pedantry isn't warranted or necessary -- Darwin is a BSD and is BSD licensed, Apple doesn't have to share anything, but they do.