{ "q01": { "type": "blank", "question": "\n\n

\nUnlike most data structures we've talked about in the past, file systems\nmust ____. That is, they must work properly despite situations such as a\n____ or system ____. When these events occur, the operating system must\nresolve the ____ problem, which is caused by the fact that the disk may\nonly complete a subset of the desired operations before the situation\nhappens and puts the file system in an ____ state.\n

\n\n

To put the file system back in order, we can use ____ or the file\nsystem checker which runs ____ the file system is mounted during boot.\nTo speed up this restoration process, modern file systems utilize ____,\nwhich adds a bit of overhead on each write, but allows them to quickly\nrecover from the events discussed above.

\n\n
\n" }, "q02": { "type": "multiple", "question": "\nSuppose we were appending to a file and had to allocate a new data block in\nthe file system to accomodate the data we are writing. Which of the\nfollowing scenarios would yield a \"file-system inconsistency\" problem:\n\n", "responses": { "dblock_only": "Just the data block is writen to disk.", "ibitmap_only": "Just the inode bitmap is updated.", "dbitmap_only": "Just the data bitmap is updated.", "bitmaps_only": "Just the inode and data bitmap are updated.", "ibitmap_dblock": "Just the inode bitmap is updated and the data block is written to disk.", "dbitmap_dblock": "Just the data bitmap is updated and the data block is written to disk." } }, "q03": { "type": "multiple", "question": "\n\nAs a followup to the previous question, which of the situations above would\nyield garbage data:\n\n\n", "responses": { "dblock_only": "Just the data block is writen to disk.", "ibitmap_only": "Just the inode bitmap is updated.", "dbitmap_only": "Just the data bitmap is updated.", "bitmaps_only": "Just the inode and data bitmap are updated.", "ibitmap_dblock": "Just the inode bitmap is updated and the data block is written to disk.", "dbitmap_dblock": "Just the data bitmap is updated and the data block is written to disk." } }, "q04": { "type": "order", "question": "\n\nMatch the following labels to the descriptions of what fsck does:\n\n
    \n \n
  1. The contents of each directory is checked.
  2. \n \n
  3. The reference count for each inode is performed.
  4. \n \n
  5. Scans inodes, indirect blocks, double indirect blocks, etc. to build\n a correct version of the allocation bitmaps.
  6. \n\n
  7. Perform sanity checks on the file system attributes such as size and\n number of blocks allocated.
  8. \n \n
  9. Locate any pointers that are outside the appropriate range.
  10. \n\n
  11. The integrity of each inode is checked for corruption.
  12. \n \n
  13. The references to data blocks are checked to see if a block is being\n shared by two inodes.
  14. \n
\n\n
\n", "responses": { "duplicates": "Check for duplicates.", "inode_state": "Check inode state.", "directories": "Check directories.", "free_blocks": "Check free blocks.", "bad_blocks": "Check for bad blocks.", "superblock": "Check superblock.", "inode_links": "Check inode links." } }, "q05": { "type": "blank", "question": "\n\nTo speedup recovery, modern file systems such as ext3 use ____ journaling,\nwhich requires the following four phases to update the file system:\n\n
    \n
  1. ____: Write the contents of the transaction to the log.
  2. \n
  3. ____: Write the transaction commit block to the log.
  4. \n
  5. ____: Write the contents of the final on-disk location.
  6. \n
  7. ____: Update the journal superblock.
  8. \n
\n\nDuring the recovery process, the fsck utility can examine the log and ____\nor redo transactions that have been ____ to disk.\n\nAn alternative form of journaling is ____ journaling, which involves\nwriting the ____ first, and only recording the metadata in the journal.\n
\n" }, "q06": { "type": "multiple", "question": "\n\nWhich of the following are possible causes of latent-sector errors or\nblock corruption?\n\n\n", "responses": { "cosmic": "Cosmic rays may flip bits.", "crash": "Disk head might touch the platter and damage the surface.", "firmware": "Faulty firmware may incorrectly record data.", "bus": "Data may be corrupted in transit." } }, "q07": { "type": "blank", "question": "\n\nThe primary mechanism for preserving data integrity is to ____ the data.\nThat is, we need to produce concise summaries of data blocks that can be\ncompared in the future. Ideally, the function we use to produce these\nsummaries would minimize ____ or situations where non-identical blocks\nproduce the same summary.\n\nWhile summaries allow us to detect block corruption, we still have the\nproblem of ____, where data is written to the wrong location. To solve\nthis, we need to add a ____ to record where the data is suppose to be\nstored.\n\nOnce we have these summaries, we can periodically perform ____, which\nchecks every block of the system and sees if the summaries are still\nvalid.\n\n\n" } }