Guts of the Filesystem Implementation: FAT

CS 321 Lecture, Dr. Lawlor, 2006/03/29

So your programs so far have called file open, read, write, and close routines.  How do those routines actually get implemented?

Clearly, the data in a file is stored somewhere on disk.  The "filesystem" determines how each file's data is stored on disk, and how the machine finds that data when you open or read a file.  Silberschatz Chapter 11 describes filesystem internals in detail.


A File Allocation Table (FAT) filesystem stores a file as a linked list of blocks.  The links are all stored near the start of the disk in an area called the FAT (which gives the filesystem its name).  Wikipedia has an excellent description of the FAT filesystem internals.

On a Linux machine, "fsck.vfat -v -v /dev/hda1" will tell you everything you ever wanted to know about a FAT filesystem.