File Systems

The Persistent Abstraction

Operating Systems provide the illusion of persistent named objects called files. Under the hood, it's a complex dance of blocks, inodes, and journals.

Module Roadmap

01. The Abstraction

Everything is a file. Understanding paths, links, and the file descriptor.

Explore Basics →

02. On Disk

How bits become files. Inodes, Superblocks, and Data Blocks.

Dive Deep →

03. Reliability

Surviving power loss. The power of Write-Ahead Logging (Journaling).

Crash & Recover →

04. VFS Layer

The universal interface. How Linux supports Ext4, NTFS, and FAT32 simultaneously.

Route Syscalls →

05. Distributed

Files across the network. NFS, SMB, and the CAP theorem applied to storage.

Go Distributed →

Chapter Index

  1. File System Basics
    • Files, Directories, and Links (Hard vs Soft).
    • The File Descriptor Table.
    • Basic API (open, read, write, close).
  2. Inodes and Data Blocks
    • The Inode Structure (Metadata).
    • Direct vs Indirect Pointers.
    • Extents (Ext4) vs Lists.
    • Directory Implementation (Linear List vs B-Tree).
  3. Journaling File Systems
    • The Crash Consistency Problem.
    • FSCK vs Journaling.
    • Write-Ahead Logging (WAL) and Checkpointing.
    • Ext4 Journaling Modes.
  4. VFS Layer
    • Virtual File System Architecture.
    • The file_operations struct.
    • Mount Points and Superblocks.
  5. Network File Systems
    • NFS Architecture (Stateless vs Stateful).
    • Remote Procedure Calls (RPC).
    • Distributed Locking Managers.
    • AFS and Caching.
  6. Module Review
    • Summary and Key Takeaways.
    • Flashcards and Cheat Sheet.