Study Atlas › Computer Science › Systems

File systems and storage

How operating systems organise data on disks into files and directories.

Edited by Alex C, EduAlx · Sources cited below

Explanation

Inodes store metadata and block pointers (Unix). Journaling (ext4, NTFS) protects against crashes; copy-on-write systems (ZFS, Btrfs, APFS) add snapshots. RAID combines disks for speed or redundancy. SSDs use flash with wear levelling and the TRIM command.

Example

RAID 1 mirrors data across two disks; RAID 5 stripes data with distributed parity.

How it works, step by step

  1. Application calls open/read/write
  2. OS resolves path to an inode
  3. Block addresses are found
  4. Data is cached, read or written
  5. Journal records changes for recovery

Open the interactive page with diagrams →

People behind it

References

  1. D. A. Patterson, G. Gibson, R. H. Katz, Proc. ACM SIGMOD 1988, 109–116.

Textbooks

Related topics

Virtualisation and containersConcurrency: deadlock and synchronisationCloud computingOperating systems: processes, scheduling and memoryPipelining and parallel processorsMemory hierarchy and cachesDistributed systems: CAP theorem and consensusAutomata and formal languagesComputer security fundamentals (CIA triad)String algorithms and pattern matching