Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
BSD Operating Systems

The Design and Implementation of the FreeBSD OS 52

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."
This discussion has been archived. No new comments can be posted.

The Design and Implementation of the FreeBSD OS

Comments Filter:
  • by BoomerSooner ( 308737 ) on Wednesday September 08, 2004 @12:38PM (#10191714) Homepage Journal
    I was considering getting the 4.4 [amazon.com] version of this book so I'm glad I waited. I've been working through the Tanenbaum OS Book [amazon.com] and it's a bit dry. I've been working through the 2.4 Linux Kernel [amazon.com] 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.
    • 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.

      • I plan on it with my company but the reality is that it's several years off from even beginning. I'm looking at running a modified linux kernel on x86, x86-64, PPC & Itanium (to me that name sounds like what I'd use to describe a large duke after getting off the pot Ex. => "I just took an itanium dump.").

        Lofty goal but the problem isn't getting it done its getting enough capital to do it. I plan on creating teams to support each platform while they decide the milestones that need to be set independe
        • SPARC has been like that for years...
        • by cipher chort ( 721069 ) on Wednesday September 08, 2004 @05:17PM (#10195342) Homepage

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

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

            Indeed? From whom did you hear this, and what details did they give? For example, in what sense is OS X server "more NeXTish"?

            • I saw it in a "complete family tree of UNIX", which I'm furiously trying to locate. 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, but that tends to confirm what I gathered informally from other sources.

              Note that both OS X and OS X server are heavily based on BSD, but it seems (again, from informal observation) that the consumer version is much more FreeBSDish an
              • Re:NeXTish (Score:5, Informative)

                by Guy Harris ( 3803 ) <guy@alum.mit.edu> on Wednesday September 08, 2004 @08:30PM (#10196805)
                I saw it in a "complete family tree of UNIX", which I'm furiously trying to locate.

                This one [levenez.com]? 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"?

                • Just one question from that graph link, why do all the arrows point from the various Mac OSX versions to the next Darwin versions? Surely there has been some amount of kernel code going the other way?
          • by green pizza ( 159161 ) on Thursday September 09, 2004 @01:16AM (#10198304) Homepage
            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 [maclovers.com] 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/ [apple.com]

            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.
          • ( 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
            • "There are ( surprise) dozens of email clients, text editors et al. for most OSes."

              True. However, most OSes don't have them all installed by default.

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

              Text editors are the classical example of Linux bloat because there's more overlap and redundancy than other examples. On a BSD (forgive me if this isn't true of the BSDs I haven't
              • You seem to forget there are also people that just love to have a large choice of programs for the same task. I'm one of these people : in fact, I first got fascinated by Linux because I looked at the impressive number of packages there were in Debian.

                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 file

                • "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 monol
                  • I actually have used FreeBSD. I know it's of course possible to run every kind of program on BSD.

                    The fact is, there is no problem with *BSD, unless you lack the bandwidth. I had a FreeBSD box at home when I still had no Internet connection at home (Having had 56K wouldn't have helped that much,anyway). It was a pain, since I had no chance to use the ports collection,and the BSD cd's had only a limited choice of packages. I didn't figure out how to obtain a coherent collection of BSD packages,unless I downl

                    • That's a good point. It basically requires broadband if you want to have fun with it. I've never used Debian off of CDs, so that distinction was lost on me. :)

                      I think you could do it with a modem, if your ISP didn't kick you off periodically and you had a second line.
                • I do all of that, but I do it on FreeBSD. What made you think that level of flexibility is limited to Linux?
          • by BoomerSooner ( 308737 ) on Thursday September 09, 2004 @01:27PM (#10203621) Homepage Journal
            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.
            • 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.

              You might want to tell Apple that - take a look at the sidebar in a Finder window (at least in Panther), and click, for example, an icon for one of your hard drive partitions, or just click on one of the hard drive icons on the desktop.

              It's unnecessary (especially if you've ever explained to someone why they keep getting dll errors after deleting a directory in windows

            • It's my understanding that gnome has brought us support for virtual file systems which show up to gnome apps. It would be nice to see them show up in KDE apps too, I have heard that this is being worked on but have no specifics whatsoever. I think you can achieve most of what you're after with a specialized linux distribution using gnome2, especially what with recent advances in X.org's X server and related software, and in gnome. Probably you could do all the same stuff with KDE but I have even less experi
    • I have had the original 4.4 version in my Amazon wish list for about four years now hoping that one of my relatives would buy it for me as a present. But alas, nobody did. An updated version may be enough inspiration for me to buy it myself.

      Tannenbaum's book, as well as the Dinosaur Book [yale.edu] are pretty standard in undergrad operating systems classes.

    • 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 imme
      • 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
  • Is this book mainly code, or is it mainly theory? I'd like to get a book that explains the guts, but I really don't want to spend days looking at page after page of code on paper.
    • Re:uhh.. (Score:5, Informative)

      by Money for Nothin' ( 754763 ) on Wednesday September 08, 2004 @04:43PM (#10194985)
      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). :)
    • Re:uhh.. (Score:5, Informative)

      by Calvinhood ( 244352 ) <johnathon_atriediesNO@SPAMhotmail.com> on Wednesday September 08, 2004 @04:45PM (#10195021)
      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.
      • Re:uhh.. (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...
      • Re:uhh.. (Score:3, Informative)

        by rivaldufus ( 634820 )

        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.

    • Is this book mainly code, or is it mainly theory? I'd like to get a book that explains the guts, but I really don't want to spend days looking at page after page of code on paper.

      A book has to cater to so many interests, and one that attempts to descrie a kernel has a really difficult task.

      A very important part of a kernel is the device drivers. As it happens, I found on the NetBSD [netbsd.org] a guide [fh-kl.de] to write device drivers for NetBSD. The goal of the article is to implement a device driver for NetBSD while givi

  • by devphaeton ( 695736 ) on Wednesday September 08, 2004 @03:59PM (#10194449)
    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.
    • by agent dero ( 680753 ) on Wednesday September 08, 2004 @04:45PM (#10195016) Homepage
      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.
  • I have the 4.4 book and somewhere I have his book on FreeBSD 3.3. When I started getting deeper into UNIX these were the first books I read. They are not just for BSD geeks, there's so much inbreeding between versions of UNIX that these are great books if you're interested in learning about Linux, or Solaris or any other UNIX variant. You might not get specific implementation details in these books but you will get a lot of great theory on OS design that is very well presented and which is applicable across
  • by cpghost ( 719344 ) on Tuesday September 14, 2004 @03:37AM (#10244117) Homepage

    Here's a sample chapter [awprofessional.com] about process management.

  • When the book came out in Germany, I got my pre-ordered copy. It's a great book, not for its choice of OS, but for its writing style.

    I have no problem with FreeBSD, or anti-BSD bias, I'm just trying to say that this is surely the best-written book about a recent operating system kernel available, and I'm enjoying reading it.

    It certainly beats "Understanding the Linux kernel", again not for its choice of OS, but for its style. It explains more, and doesn't hassle you with platform dependent assembler code.

"Someone's been mean to you! Tell me who it is, so I can punch him tastefully." -- Ralph Bakshi's Mighty Mouse

Working...