File allocation and free-space management

Compare contiguous, linked and indexed layouts while tracking the space structures that make allocation possible. Filesystems and storage · Operating systems.

Reading the fifth block of a six-block file can cost one disk read or several, depending only on how the file is laid out, and a disk with room for a file can still refuse it. What does the layout change?

What you will learn

  • Count the disk reads needed to reach one block under each layout
  • Explain why contiguous files fragment free space and indexed files do not
  • Turn a byte offset into a block and a pointer path, and a block count into bitmap bytes

Lesson outline

  1. From logical blocks to disk blocks
  2. One file, four layouts
  3. Growing and fragmenting
  4. Pointers in an inode
  5. Tracking free space

16 minutes · 4 scenes · 0 predict checks · 11 quiz questions

The full lesson is available with Premium.