The Design and Implementation of the FreeBSD OS
n0dez writes "Peter H. Salus has written a review of The Design and Implementation of the FreeBSD Operating System on UnixReview.
"If you need to understand just how a kernel works, you need this book. McKusick and Neville-Neil have done the community a favor, and this book deserves to be a best seller." This book is an update to The Design and Implementation of the 4.4BSD Operating System by Marshall Kirk McKusick."
I don't know about this new FreeBSD-specific book, but the previous 4.4BSD book (also by McKusick, etc.) was a combination of code and design explanation. I didn't read the whole thing, but I used much of the book for a term paper about FreeBSD's design a year ago, and probably 80% or so of the book was design info, not code.
:)
That makes sense too -- after all, the code is bound to be changed sooner or later, making the book out of date, even though the same design principles may be in-use. This was a good move on McKusick's & Co's part, b/c much of the information they published back in 1996 still applies even today to FreeBSD 5.x (that said, 5.x is definitely a major change, particularly w.r.t. the process scheduler).
Go to a university library if you want to find a copy without buying it. Most normal public libraries won't have a copy (alternatively, you can hang out at Borders or Barnes and Noble and browse through it there).
Speaking from experience though, if you want a "book that explains the guts" without forcing you to read reams of code (and why would you? The source is available online for free to read instead!), then you want McKusick, etc.'s book (I imagine this new FreeBSD-specific book is similar to the 4.4BSD book).
I looked hard (as in, for the better part of a semester) -- there simply is not a more-comprehensive BSD OS-design reference anywhere. And yes, I got an 'A' on my paper (updated from the 4.4BSD's era to include FreeBSD-specific info, including through FBSD-5.1, however).
Is Capitalism Good for the Poor?
For the most part the book presents the organization and major algorithms used in FreeBSD, and then presents the theory and rational behind the choice. It also presents some alternative implementations that could have been used and explains why they weren't.
As far as code, I don't think there's a single line of it in the book.
I'm nitpicking, but there *is* code in "The Design and Implementation of 4.4BSD."
See page 233 which has C source for checking access permissions for a file ("int ufs_access(ap)", etc.).
There's not much code; as you say, the code that is there is mostly C-style P-code to explain the algorithms. But there still exists some code...
Is Capitalism Good for the Poor?
This one? If so, note that the OS X Server releases starting with the one labeled "Mac OS X Server 10.0.3" have arrows from the OS X client line. The earlier OS X Server releases didn't have an Aqua GUI - they had a more Mac-like GUI (more Rhapsody-derived).
Exactly. It's talking about one of the old OS X server 1.x releases that came out before the client OS X 10.0.
Perhaps those other sources think OS X Server is still more like the older 1.x releases, without all the stuff added on the client side since then, including the Aqua GUI (or are old source from when it was one of the older 1.x releases).
The Mach stuff that's generally visible is mainly the object file format; that stuff is present in both client and server, as is the Mach+BSD kernel (/mach_kernel) and Mach-related user-mode servers such as mach_init. What stuff have you observed that shows the client being "more FreeBSDish" and the server ("server" meaning "server with the same version as the client", e.g. if your client is 10.3[.x], the server should be another 10.3 version, not one of the really old servers) being "more Machish"?
I just bought it today. There is a little bit of code, mainly snippets from headers and drivers.
From the little I've read so far (30 pages), it's an excellent book. I liked the previous book (on the 4.4BSD system - I've never read the 4.3BSD book), but this one is a lot more relevant to current operating systems, as the former is about 8 years old.
To my understanding, OS X Server isn't even the same code-base as normal OS X. Supposedly it's more NeXTish.
.edu) and Unlimited-client for $1000 ($500 .edu). Client restrictions only affect simulataneous Mac and Win file sharing, so many shops just use the 10-client version.
OS X Server 1.0 came out over a year before the OS X Client. At the time of Server's original release it was basiclly a Mac-flavored version of NeXT OPENSTEP. Apple's client OS at the time was still classic Mac OS 9 (or was it 8.6?).
When Apple released Mac OS X 10.0, with the Aqua GUI and all of its refined NeXTisms, they replaced the original OS X Server with one based on 10.0. This trend has continued today with 10.3 and soon, 10.4.
The only differences between Server and Client today are the inclusion of more open source daemons and apps, optimized configurations, and some (really snazzy) closed source management tools. Remote admin can be done via a remote shell (BSD derrived), web interface, or from another Mac using the management apps. Server comes in two flavors: 10-client for $500 ($250
http://www.apple.com/server/macosx/
If you have an older Mac that doesn't support Mac OS X, or if you have an x86 PC (or if you have a semi-modern Mac but don't want to pay for an upgrade to 10.3 Client or Server), you can install Darwin, the open-source core of Mac OS X. It's basiclly Apple's NeXTish BSD distribution, but based on the Mach kernel and using NetInfo to manage configuration. You won't get the Aqua GUI (but you can use straight X11) nor the GUI admin tools, but everything else will be about the same.
Perhaps the coolest thing about Darwin is the fact it's opensource -- driver and utility coders love this, there aren't too many secrets when the core OS has open code.
That's kind of the problem. In Linux or BSD, you need a package manager. If you don't have one, you have to check all the dependencies yourself, and it'll drive you mad. In Mac OS X, however, a package manager is totally unnecessary. Installing a new program? Drag the icon to the Applications folder. What about the dependencies? Everything it needs is located in the folders hidden behind the icon. Double-clicking executes the application, but the icon itself does not necessarily represent only an executable. You can browse the folders inside, if you like, to check everything it's using. Want to uninstall? Drag it to the trash. All its libraries go with it. I run SuSE and FreeBSD, and I wish it was that easy.
Lack of eloquence does not denote lack of intelligence, though they often coincide.
Here's a sample chapter about process management.
cpghost at Cordula's Web.