Slashdot Mirror


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."

18 of 52 comments (clear)

  1. I was considering this book by BoomerSooner · · Score: 3, Interesting

    I was considering getting the 4.4 version of this book so I'm glad I waited. I've been working through the Tanenbaum OS Book and it's a bit dry. I've been working through the 2.4 Linux Kernel as well. It's amazing the quality that goes into these open source offerings.

    I just wish someone would make a linux distro that is more like OS X. It would bring Linux to the desktop faster and give grandma an interface she could easily understand.

    1. Re:I was considering this book by bhima · · Score: 2, Interesting
      I use OS X and NetBSD at home.

      Also I support Linux, NetBSD & VxWorks at work.

      I wish someone would make something as nice as OS X for something besides my Macs.

      Still, I think my mum could use SusE, currently she uses OS X 10.3 on her iLamp and it suits her nicely.

      --
      Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity.
    2. Re:I was considering this book by joshmccormack · · Score: 2, Insightful

      I just wish someone would make a linux distro that is more like OS X. It would bring Linux to the desktop faster and give grandma an interface she could easily understand.

      I don't really understand what you're talking about. Are you refering to the GUI? What about KDE? That's pretty easy to use.

      Do you mean software installs? I'm not a huge fan, as I like a package manager that can handle dependencies and help with uninstalling and such, as you're more likely to find in Linux/*BSD.

      And something being immediately understandable does not make it powerful. If anything, it can hinder it.

    3. Re:I was considering this book by sean23007 · · Score: 2, Informative

      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.
  2. Happy Birthday to Me!! by devphaeton · · Score: 3, Funny

    However, no amount of hinting got me this as a birthday present.

    However, my gf *did* get me a mess of other cool stuff- a new GeForce video card, a pile of video games for PC and PS2 (she's always telling me that i need to play more games....), some Lego...

    No worries though.. I'm sure to pick this up myself anyways.

    --


    do() || do_not(); // try();
    1. Re:Happy Birthday to Me!! by agent+dero · · Score: 4, Funny

      However, my gf *did* get me a mess of other cool stuff- a new GeForce video card, a pile of video games for PC and PS2 (she's always telling me that i need to play more games....), some Lego...

      Something tells me your bluffing, like the "gf" & "play more games" in one sentence ;)

      However, if I had a pretend-girlfriend, i'd want her to buy me the book too.

      --
      Error 407 - No creative sig found
  3. Re:uhh.. by Money+for+Nothin' · · Score: 5, Informative

    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). :)

  4. Re:uhh.. by Calvinhood · · Score: 5, Informative

    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.

  5. Not Another Linux Distro by cipher+chort · · Score: 4, Interesting

    "I'm looking at running a modified linux kernel on x86, x86-64, PPC & Itanium"

    Assuming your goal is to create a pretty desktop OS like OS X, why would you run it on Itanium? Itanium is designed specifically as a "RISC killer" for high-end RISC/UNIX shops (and it's failing miserably, I might add). To my understanding, OS X Server isn't even the same code-base as normal OS X. Supposedly it's more NeXTish. The point is that Apple's servers don't really run the same OS that their desktops and laptops do.

    It always strikes me as funny when Linux people whine about the lack of a Linux distribution that works like OS X. Hmmm, maybe that's because Apple pays developers market wage to create their interface, rather than relying on community contributions by random, unaccountable people? Also, it seems that the Enlightenment WM is really supposed to mimmic OS X, so perhaps the lament should be "I wish there was a WM..." rather than "I wish there was a distro...". Besides, if you recognize that OS X is so much better, why don't you just buy a system with OS X? Do you not believe in paying for quality, or should everything just be handed to you on a silver platter?

    Then again, that's the problem with the Linux community. Instead of contributing towards a common project and common goals, everyone goes off and totally duplicates the effort of everyone else. You end up with dozens of WMs, dozens of text editors, dozens of e-mail clients, a dozen web browsers, hundreds of OSs (that's what a distro is, after all) and not ONE of them approaches the quality of a commercial OS.

    If free software is ever going to approach the quality of commercial software, people have to stop this assinine "I'll start my own ___" mentality and learn to work in productive teams. The Apache web server and OpenSSL should be examples of how to do things. There aren't 10 different common SSL implementations in Open Source.

    Getting slightly back on topic, BSD should serve as a good example for how to do OSS right. Have large groups of developers working on an integrated project, i.e. a whole OS. Pick one default for everything, and don't duplicate effort all over the place. There are only really four free BSDs (Dragonfly, Free, Net, Open) and they share code heavily. The default installations have one sane selection for each task, and you can add more from ports if you really, really feel like it. Development is a lot more cohesive and as a result, the BSD releases tend to work a lot more reliably. Imagine that!

    --
    Someone is WRONG on the Internet!
    1. Re:Not Another Linux Distro by zx71 · · Score: 2, Interesting

      ( I'll bite). always strikes me as funny when Linux people whine about the lack of a Linux distribution that works like OS X. Hmmm, maybe that's because Apple pays developers market wage to create their interface, rather than relying on community contributions by random, unaccountable people? Also, it seems that the Enlightenment WM is really supposed to mimmic OS X, (...) Have you ever used Enlightenment ( probably not )? It is nothing like OSX. The closest you could reasonably come to your statement is to point out the existence of a OSX skin. Also, Enlightenment predates OSX by quite a bit, so it would be hard for it to be designed as an OSX clone. Then again, that's the problem with the Linux community. Instead of contributing towards a common project and common goals, everyone goes off and totally duplicates the effort of everyone else. You end up with dozens of WMs, dozens of text editors, dozens of e-mail clients, a dozen web browsers, hundreds of OSs (that's what a distro is, after all) and not ONE of them approaches the quality of a commercial OS. There are ( surprise) dozens of email clients, text editors et al. for most OSes. I think you'll find a large number of these programs are not linux-exclusive. vi and emacs can be found on almost any nix system, for example. Including several commercial ones. Now counting a distro as a full OS is pushing it quite a bit, but even so, there are commercial distros - by your definition RedHat and SuSE don't approach their own quality.

    2. Re:Not Another Linux Distro by BoomerSooner · · Score: 3, Interesting

      You're probably right about the Itanic. I was just thinking out loud. PPC & x86-64 are the two main platforms I would like to focus on. I fully intend to pay my people for building the OS. There are so many great OSS projects out there that I have no intention of reinventing the wheel. Look at how much OSS stuff is in Mac OS X, it's quite amazing.

      The real things that I find lacking is an integrated desktop to filesystem like both the Mac and Windows OSes offer. This makes life much easier for users. I do like the mac way of avoiding the registry as well. That thing is a fucking mess. Why shouldn't someone be able to tar zxvf their harddrive and simply restore their software (hell and maybe the OS too).

      Plus the installation in Linux through the distros is too much. I remember trying to read every entry the first time I installed Slackware in '95. It took several hours to read, I cannot imagine selecting packages now (it's about 6GB installed last I saw from Fedora Core 2).

      OS X also has the GUI filesystem layed out right. There is no reason for the gui file manager (finder) to show the root of the hard drive. It's unnecessary (especially if you've ever explained to someone why they keep getting dll errors after deleting a directory in windows less than one day after reinstalling the system, thanks mom).

      I know Linux can be an excellent desktop choice for consumers. It however needs to make some decisions (like you said about BSD) as to what needs to be included, instead of what should be included just incase the person using the system is a graphic designing programmer who uses vi/emacs/nedit/joe/... at the same time while running mozilla/lynx/firefox/konqueror(sp?)/... if you get the drift.

    3. Re:Not Another Linux Distro by ArbitraryConstant · · Score: 2, Interesting

      "I usually run mplayer, but sometimes xine is better suited to my tastes. Having both Firefox and Konqueror is pure gold, depending what kind of things are you browsing (casual browsing=Firefox , work browsing=lots of pdf docs+frequent interaction with my files=Konqueror). Even more than one text editor is ok, since I can use the fully featured Kate when programming and gvim as a "very advanced notepad" (Yes,I know both are not the true-geek-choices).

      For me, OSS is choice and flexibility. Perhaps the monolithic approach of the BSD's is what is leaving them behind (of user base, not technically,where they're probably equal or superior) the confused,fat penguin.
      "

      It's pretty clear you haven't used a BSD... I've used a half dozen Linuxes, and you sacrifice none of the choice and flexibility when using a BSD, except for the rare case of software that's not portable (I've never personally had a problem with this).

      The whole point is that the base system is small and well tested. Extras that haven't been as extensively tested are available but not essential to system operation. Debian-stable is the only Linux I've used that can keep up with this reliability, and it's pretty far behind in terms of recent versions of things.

      --
      I rarely criticize things I don't care about.
  6. Re:uhh.. by Money+for+Nothin' · · Score: 2, Informative

    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...

  7. Re:NeXTish by Guy+Harris · · Score: 4, Informative
    I saw it in a "complete family tree of UNIX", which I'm furiously trying to locate.

    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).

    I also found http://www.macintouch.com/mxs.html which near the very top is talking about how the interface is heavily NeXT and not like traditional Mac OS, granted it's quite old information

    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.

    but that tends to confirm what I gathered informally from other sources.

    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).

    but it seems (again, from informal observation) that the consumer version is much more FreeBSDish and the server version is much more Machish

    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"?

  8. Re:uhh.. by rivaldufus · · Score: 3, Informative

    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.

  9. Not anymore --- Mac OS X Server by green+pizza · · Score: 3, Informative

    To my understanding, OS X Server isn't even the same code-base as normal OS X. Supposedly it's more NeXTish.

    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 .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.

    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.

  10. Itanic is a sinking by cipher+chort · · Score: 2, Insightful

    So falling $13B short of expected sales and shipping less than 6,000 units in Q2 is considered a success? The only vendor to ship over 300 units was HP. Compare that to say, Apple who shipped 13,000 Xserves, which arguably are the biggest competitor to Itanic in the clustering market for universities and super-computer centers. If we look at the Opteron, that shipped 60,000 (of course it's usually not a direct one to one vs. Itanic, but you get the idea).

    For over a decade of R&D and combine billions from Intel and HP, that has to be a major failure. Just the fact that they're adding 64bit extensions to Xeon shows you that Itanium is failing to gain the server market share that they planned on and now they have to plug the holes by beefing up their low-end server gear.

    Now comes news from IDF that HP is adding more Opteron kits to it's lineup with 4 way boxes and blades. Hmmm, that doesn't sound like a company that has faith in Itanium to me, and they were the second largest investor!

    There is of course the old saying "no one ever got fired for buying IBM", but I wonder if in a few years there won't be a rash of firings for "buying Intel" when Itanics platform support is still lagging terribly behind other architectures.

    --
    Someone is WRONG on the Internet!
  11. Sample chapter available online by cpghost · · Score: 2, Informative

    Here's a sample chapter about process management.

    --
    cpghost at Cordula's Web.