Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Practical File System Design with the Be File System 258

erikharrison writes "Dominic Giampaolo's Practical File System Design with the Be Filesystem has been around since 1999 - not exactly a new book. The book has been out of print for a time now, however, so Dominic made the book available in PDF form on his website. With this public release of the book, and the BeOS rising to join the ranks of OSs that won't die (hi Amiga!) it makes sense to take a look at what the book has to offer us today." Read on for the rest of Harrison's review below to see just what that is -- it covers a surprisingly broad range.
Practical File System Design with the Be File System
author Dominic Giampaolo
pages 227 pp
publisher MORGAN KAUFMANN PUBLISHERS, INC.
rating 8.5 of 10
reviewer erikharrison
ISBN 1558604979
summary Discusses implemeting a file system, using the Be file system as example

Table of Contents

  • Chapter 1 Introduction to the BeOS and BFS
  • Chapter 2 What Is a File System?
  • Chapter 3 Other File Systems
  • Chapter 4 The Data Structures of BFS
  • Chapter 5 Attributes, Indexing, and Queries
  • Chapter 6 Allocation Policies
  • Chapter 7 Journaling
  • Chapter 8 The Disk Block Cache
  • Chapter 9 File System Performance
  • Chapter 10 The Vnode Layer
  • Chapter 11 User-Level API
  • Chapter 12 Testing
  • Appendix A File System Construction Kit

First thing to note is that Giampaolo is not a great writer, nor is he a bad one. He does not have the gift that some tech writers have of making both an interesting technical document and a fun read. His style is very straightforward - introduce idea, explicate idea, summarize idea. On the other hand, he knows his topic inside and out, and has an obvious enthusiasm for the material, and a real talent for saying things simply without dumbing it down, and his occasional dry wit makes the book a surprisingly easy read.

Giampaolo is doing two things - discussing designing filesystems in general and documenting the Be filesystem. He does both well. BeFS has some advanced features - arbitrary metadata, attribute queries, and indexing. The desire to support these features influences the overall design of the system, but Giampaolo shows how changes to that design change implementation details. The result is a good overview of how a file system works, the trade-offs in optimizing for a particular usage pattern, and how to design one yourself.

The book can be roughly divided into three sections: the first is an overview of how filesystems work and some of the concepts that you encounter - extents, inodes, B-trees, superblocks, and the other standard pieces of a filesystem. Included in this early section is a good high-level overview of the design of five other file systems: BSD FFS, Linux's ext2, Macintosh HFS, Irix XFS, and Windows NT's NTFS. The coverage here strikes a proper balance between too much and too little information. Giampaolo prefers to show rather than to tell, and these filesystem overviews make the connection between design, performance, and features perfectly clear, and provide a solid background to talk about a specific implementation in detail - namely BeFS.

The second section is the bulk of the book - how to implement a filesystem from the ground up, leaning heavily on the BeFS implementation for examples. This is the most straightforward part of the book. Giampaolo covers a single issue in design and implementation in a "Here's the problem, here's and overview of possible solutions and their drawbacks, here's how I did it, now lets summarize" manner. Again, Giampaolo's style makes this an easy if somewhat dry read. As a filesystem and kernel ignoramus, I would have appreciated a slightly more detailed coverage of how all of the various data structures get to disk - how are they serialized, whether endianess is an issue, etc. The BeOS was pretty portable, running at one time or another on the AT&T Hobbit processor, PowerPC, and x86 - I would have liked to have seen portability issues discussed, however, BeFS wasn't written until after the move from the Hobbit to PowerPC, and the book was written prior to the move to x86, so the lack of coverage is reasonable.

Even considering the plain Jane style of this middle section, there are a few gems. The coverage of journaling is excellent, and while I've long understood journaling from a 10,000 foot perspective, this really made me understand the underlying concepts, combined with simple code snippets that helped understand implementation. The Allocation Policies chapter showed in clear terms that disk access is a major bottleneck, and filesystems have become very sophisticated in their optimizations.

The third section of the book deals with some of the more indirect concerns in implementing a file system; specifically, interacting with the kernel, designing a user level API and the major role of testing in filesystem development. This is the one place Giampaolo's writing shines. He really is a good teacher, and this section affords him the chance to talk about the broader perspective of OS design, and even recount a few war stories. For example, in terms of parentage, the BeOS has BSD and classic MacOS as its father and mother. In a few places, such as the Storage Kit API covered in chapter 11, this heritage shows some signs of less-than-seamless integration, and this offers Giampalo a chance to wax philosophical on the nature of OS design, company politics, and the pressure of shipping dates.

In short, the book lives up to it's title. The author is a pragmatist, and offers a clear roadmap for those who have a need to work with low level filesystem implementation. His emphasis on testing, careful optimization, and data structure protection not only helps to show the pitfalls of filesystem work, but also offers a Swiss army knife of techniques to dodge them. The book concludes with a short appendix which covers a file system construction kit, allowing a would-be implementor to begin work on his own filesystem safely without worrying about killing his hard disk. All in all, a solid read.


Here's a link to Practical File System Design with the Be File System as a PDF; you can also look for a used copy at Barnes & Noble. Slashdot welcomes readers' book reviews -- to see your own review here, carefully read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

Practical File System Design with the Be File System

Comments Filter:
  • It's a nice thought. (Score:5, Interesting)

    by DiscordOfFive ( 778099 ) on Monday May 10, 2004 @04:49PM (#9110535) Journal
    I generally think it's a good thing when books get put up (legally) on the web like this. My personal view on BeOS is that it's more of a hobby OS than a production one, but a book that details the workings of a complex system is useful. After all, maybe it'll help form the basis of a new, advanced FS.
  • BeOS won't die? (Score:1, Interesting)

    by Bruce Perens ( 3872 ) <bruce@perens.com> on Monday May 10, 2004 @05:01PM (#9110647) Homepage Journal
    BeOS won't die?

    What if there was a company that said it was using BeOS, and really wasn't, but just wanted people to think so until they were ready to release their product?

    Bruce

  • by ceswiedler ( 165311 ) * <chris@swiedler.org> on Monday May 10, 2004 @05:02PM (#9110659)
    It's interesting that one of the features of BeFS is its metadata indexing capabilities (which are the beginnings of a relational model).

    Clearly the BeOS designers agree with you.

    It's also interesting that the author spends quite a while discussing how difficult it is to do well (particularly performance-wise) and how they almost left it out (IIRC) and/or had to limit its scope.

    Clearly the BeOS developers think you're wrong.

    And personally, I'll believe people who have actually tried to implement the technology in question over people who say others should do so.
  • Re:ironic fact (Score:3, Interesting)

    by nacturation ( 646836 ) <nacturation AT gmail DOT com> on Monday May 10, 2004 @05:20PM (#9110822) Journal
    ...especially when you consider that both NeXT and Be were started by former Apple VPs (Steve Jobs and Jean-Louis Gassee [macobserver.com]).
  • BeFS lives (Score:5, Interesting)

    by no reason to be here ( 218628 ) on Monday May 10, 2004 @05:21PM (#9110824) Homepage
    OpenBeOS [openbeos.org]'s clone of the Be File System has been selected recently by the folks creating the SkyOS [skyos.org].

    The BFS replacement has been one of the fastest progressing parts of the OpenBeOS project. Dominic Giampaolo has actually commented to the team lead of OpenBFS, and complemented the team on the good work they accomplished.
  • Re:ironic fact (Score:2, Interesting)

    by ckelly5 ( 688986 ) on Monday May 10, 2004 @05:21PM (#9110826)
    Yes, I loved BeOS back in its heyday. When I learned that Giampaolo had gone to Apple, I figured he'd be beefing up the FS. His first work was probably the Journaling FS that is prevalent in Panther, and the rumored metadata in Tiger has his name all over it...
  • Re:ironic fact (Score:2, Interesting)

    by Power Everywhere ( 778645 ) on Monday May 10, 2004 @05:44PM (#9111042) Homepage
    The original Hierarchal Filesystem (HFS), introduced well before System 6 was called "Mac OS Standard" after Mac OS 8.1. It was this same release that Apple released Hierarchal Filesystem Plus (HFS+), which they opted to call "Mac OS Extended." In Tiger, using the metadata and relational aspects tacked onto HFS+ will be called Mac OS Extreme when you go to format your drive and turn on different features of your filesystem.
  • At Apple Now (Score:2, Interesting)

    by wintahmoot ( 17043 ) on Monday May 10, 2004 @05:50PM (#9111097) Homepage
    One thing that didn't get mentioned is that the author of this book is at Apple today, and rumor is that he is working on Apple's version of WinFS, a metadata-driven filesystem.

    Be saw the potential of metadata on the filesystem level before everybody else did.
  • by Anonymous Coward on Monday May 10, 2004 @05:52PM (#9111118)
    These days, the idea of using any other database model seems ludicrous.

    I would kill to get a PROPER object-database instead of spending 1/3 of the development time on manually making O/R mappings, Factory-objects, etc. In most situations I don't care how data is stored in the memory so why should I care how it's stored on the hardrive? Too slow, you say? Buy a bigger box! Cheaper than wasting $70.000 salleries on redundant stupid work... (by the way, done correctly, in many scenarios I can't see a big performance punishment)

    Totally off-topic, sorry ;)

    Cheerios
    Peter
  • Alive? (Score:3, Interesting)

    by moosesocks ( 264553 ) on Monday May 10, 2004 @06:08PM (#9111239) Homepage
    It's sort of hard for an OS to die which wasn't really alive to begin with.

    That being said, I remember using the last BeOS Personal Edition (the one that ran on top of FAT32).

    It was incredibly cool. There's definitely something to be said for an OS which boots almost instantaneously.

    The inability to print was somewhat of a drawback...
  • by danielblair ( 637546 ) <javahax0r@gmail.com> on Monday May 10, 2004 @06:49PM (#9111614) Homepage
    Here is a link to another GOOD MIRROR! Use it!

    You are all welcome!

    http://www.realcoders.org [realcoders.org]

    Have Fun Everyone!

    -Danny

    joecamel (at) realcoders (dot) org

  • just remember... (Score:5, Interesting)

    by hak1du ( 761835 ) on Monday May 10, 2004 @07:11PM (#9111812) Journal
    Access control lists, user-defined metadata, indexing at the file system level, and all that are not new ideas; they go back to the 1960's. Be didn't invent them, and neither did Microsoft (with WinFS).

    All that complexity comes at a price. UNIX was a reaction against putting so many features into the kernel, and, in my opinion, the UNIX arguments against putting those kinds of features into the kernel are as valid today as they were 30 years ago.

    Unfortunately, the book gives very little historical perspective. It seems to simply assume that "more features" translates into "more advanced". From a quick perusal, division of functionality between kernel and user space seems to be not covered. File versioning at the file system level, another important feature, does not seem to be covered. Historically important file systems and functionality, like those found on VMS, IBM mainframes, and database-based file systems are hardly covered at all.

    This book may give you a good idea of what kind of thinking went into the design of the BeOS file system, but it doesn't even come close to a book on file system design in general. And even as a book on the BeOS file system design, it tells you as much about what the creator of the file system didn't think about as what he did think about.

The use of money is all the advantage there is to having money. -- B. Franklin

Working...