Mac OS X Internals: Reviews
Selected Reviews
This book has to be one of the most comprehensive treatments of any operating system ever. I read through the sections with which I am most familiar (file systems, Spotlight and HFS). The level of detail and understanding expressed in those sections is very impressive. I thought I might find some errors or at least niggling details that weren't quite right but I could not find any.
Perusing the other sections of the book I even found that I learned a few things. The depth and breadth of this book make it a must-have for anyone involved in MacOS X programming (IMHO). Even if you're not a kernel programmer, there are many details and pieces of information that explain how and why things work the way they do.
Amit Singh's Mac OS X Internals book is, for all intents and purposes, a flawless treatment of the subject matter. The breadth of coverage crosses all major kernel subsystems (processes/threads, virtual memory, etc), extentions, a history of Mac OS X, programming/developement environments, hardware architecture (including PPC details) and system firmware. I can't think of anything that Mr. Singh did not cover.
And the depth! Fantastic! A brilliant top-down approach to the individual subjects, getting into all the detail one could want, all the while maintaining a wonderfully readable style. It is not trivial to make such subject matter a pleasure to read, but Mr. Singh has stepped to the task. I feel like I learned something on almost every page!
There are general computer science gems sprinkled throughout the text (the "systems" approach), so for those relatively new to operating systems, microprocessor design features (e.g. caches and cache types), programming constructs (stack management, recursion, etc), virtual memory, etc, you will extend your knowledge in areas beyond that of Mac OS X implementation details. You'll get the bigger picture.
One of my overall favorite operating systems books of all time. Highly recommended for anyone interested in Operating Systems and/or Mac OS X.
If you want a cookbook approach to dealing with Mac OS X as an end user, this isn't the book for you. But if you're intrigued by UNIX, by Mac OS X, by operating systems in general; if you're a developer using Mac OS X, Mach, or Darwin technologies; or just someone with a desire to understand what really happens under the covers of your operating system, you'll enjoy this book.
But at about 1600 pages, it's certainly awe inspiring. (Having written a much smaller book myself, I can hardly imagine how he could have accomplished this feat.)
Amit Singh writes well, clearly, and simply, despite the complexity and depth of his material. I've read just a few sections in detail, but skimmed through many. I've found any page to which I might open intriguing and readable.
Want to know about EFI and Open Firmware? Mach? The long and rocky technical history of Apple's quest for a solid modern operating system? X86 and PowerPC technology? What a "framework" really means? How to debug the kernel, or how the UNIX VFS and traditional Apple HFS+ filesystems interrelate? (And even an excellent comparison of HFS+ and NTFS.) It's all here, clear and concise.
If it wasn't so heavy, it'd be awfully hard to put down. ;-)
When I ordered the book from Amazon, I didn't look at page count, so when I picked up the box from my front porch I thought it couldn't possibly contain just one book. Wow, what a monster!
(Full disclosure: Back in Feb. 2004 I reviewed Singh's proposal to Addison-Wesley for this book, gave it an enthusiastic recommendation, and was paid a small sum.)
I have a bunch of OS internals books, but this one at 1600 pages is more than twice as big as the next biggest. There are two reasons: Mac OS X is the most functionally rich of any OS I know of, and Singh covers it in amazing detail.
I'm only up to page 50, but I've already learned a lot about Mac OS X's fascinating history, which goes back to NextStep and Mach (mid-1980s), and includes parts from the original Mac OS (now represented in Classic and Carbon) and BSD, as well as newer subsystems developed entirely at Apple. The UNIX-like part is called Darwin, and I discussed its API in my own book, Advanced UNIX Programming (available from Amazon). But Darwin is only a fragment of what Singh takes on.
This book is essential for anybody that wants to understand the inner workings of Mac OS X, which should include all serious OSX software developers. This book is also a must read for any technical users of OSX, in order for them to know what's really underneath the covers, even when they are not writing software for OSX.
I am the second type of reader: I am a researcher with Microsoft Research, where I work mostly on operating-systems related topics. However, at home, I've had machines running OSX since version 10.0, and I have been waiting for somebody to write this book since then. (In fact, I was eager enough to review portions of an early draft of this book.)
The published book is a bit daunting, at over 1600 pages (bound in a sturdy format, which should tolerate heavy use). However, as quickly becomes clear, it covers a complex topic in such substantial detail that it is hard to see how it could be shorter. Also, given the book's size, and the amount of material it covers, the price seems very reasonable.
Fortunately, despite its size, the book is well structured and has a good index, so information is easy to find. Also, the book is written in an highly readable style, which helps the reader maintain attention. As a result, the book is quite pleasant to browse and read a few dozen pages at a time (as I've been doing for a while, as light bed-side reading).
One of the reasons this book is so useful is that, even more so than other modern operating systems, OSX is a complex mix of new and legacy technologies, both proprietary and open source. So to understand OSX, one has to understand parts of Mac OS 9, Mach, BSD Unix, NextStep, GNU/Linux as well as technology novel to OSX. This book does a good job of covering all of these influences, and give enough historical background to understand why OSX is like it is. Of course, it is possible to successfully use OSX as a "Unix", without knowing about other APIs or subsystems---however, this makes it impossible to use much functionality, and to truly understand the entire system.
This book covers most essential OSX abstractions and concepts, much like the Magic Garden Explained does for System V, the "red daemon" books do for BSD, and the Windows Internals books do for NT. So, the reader will know how scheduling, memory management, synchronization and inter-process communication works, how Mach tasks relate to processes, and other such essentials.
Some of the other operating system books (e.g., the BSD books) relate what they discuss to particular files and functions of the source code. As far as I can tell, this book does this to an unprecedented extent, describing in detail the Darwin sources for OSX and how they implement the concepts being discussed. In particular, for important system aspects, such as booting and initialization, and scheduling, the data and control flow between source functions is given in complete detail. So, for anybody wanting to explore the Darwin sources, I would think this book would be an invaluable guide.
Another striking property of this book is its detailed "programming examples", for which full source code is usually given. These make the book feel much different than other concepts books, as the author clearly likes to get "down and dirty" and play with the aspects of the system that he describes. The examples range from the incredibly useful (such as user-mode install and control of device drivers) to the highly esoteric (a custom boot GUI in Open Firmware). Some of the examples, such as the one on OSX virtual-machine-monitor interfaces, are likely the only place one may find information and working code for powerful OSX features. These "examples" are typically the basis for interesting system utilities, and in combination with the book's website (osxbook.com), they remind me of how the SysInternals utilities and source code have helped make Windows internals much less mysterious, and enabled much advanced systems work for Windows.
It is worth stressing again that the book is amazingly detailed on a number of topics. For example, it covers the hardware and system initialization of OSX in great detail, in particular for PowerPC and Open Firmware. Also, one could say there is a "mini book" on filesystems, with around 250 pages dedicated to OSX filesystems and the detailed inner workings of HFS+. Much of this information is not available anywhere else in a accessible form for an OSX audience, as far as I know.
Finally, the book has the website http://osxbook.com (formerly kernelthread.com) that is frequently updated with interesting new stuff. There is already lots of bonus material (and sources) on this website. In fact, I keep seeing the website cited in slashdot postings, as the author releases new utilities etc. If you like the articles etc. on that site, you will almost certainly enjoy this book. Also, having the book will make it easier to understand the source for advanced OSX tricks and utilities, both those at osxbook.com and elsewhere.
A notable omission in the book is that it doesn't have much of a discussion of the internals of OSX networking (although it says it is much like that in BSD). I was somewhat surprised when I noticed this, but I guess that the book is as thick as it can be at 1600 pages. Hopefully the book's author will be posting bonus material about OSX networking on the book's webpage, which will make the treatment truly comprehensive.