Project 5 FAQ

This is a list of frequently asked questions about Project Five. Check back here frequently for updates.
  • Q: image.100 looks a little funny. The size of one file doesn't match up with the allocated blocks.

    A: Yes, you are right. There weren't enough blocks to store all of the necessary file data. Try looking at image.200, which is big enough to hold the entire file.

  • Q: I think that I have debug working. Can you give me some sample output so that I can check my answer?

    A: Sure, here is what my solution produces for image.20:

     fs341> debug
    superblock:
        20 blocks
        3 inode blocks
        384 inodes
    inode 2:
        size: 27160 bytes
        direct blocks: 4 5 6 7 8
        indirect block: 9
        indirect data blocks: 13 14
    inode 3:
        size: 9546 bytes
        direct blocks: 10 11 12
    
  • Q: The project description says that format should set aside 10 percent of the blocks for inodes, but the example filesystems have 10 percent plus one block. Which is correct?

    A: Both are correct! In a real filesystem, the number of inode blocks is chosen when the disk is formatted, so an operating system must be prepared to deal with whatever number of inode blocks are specified in the superblock. However, your format routine should always compute ten percent.

  • Q: What should happen if the user formats a disk that is already mounted?

    A: In this case, the format call should do nothing and return failure.

  • Q: Is it necessary for format to zero out every block on the disk?

    A: No. Format should do the minimum work necessary to create a blank filesystem. A blank filesystem should have no valid inodes, and thus no data blocks in use. The actual contents of the data blocks don't matter if no inode refers to them.

    Now, if you were really worried about someone stealing your disk and then writing their own code to examine the data in blocks that were not in use, then a really aggressive filesystem would actually fill unused blocks with zeroes during a format or a delete. But, you don't have to do this.

  • Q: Can you delete an inode that is not being used i.e. not valid?

    A: A delete on an invalid inode should do nothing and return failure.

  • Q: Can I use a Mac or a Sun to do this project?

    A: No, you have to use the Linux machines in the Fitzlab, because the image files are little-endian.