ScholarGate
دستیار

File Systems

A file system is the operating-system component that organizes persistent data into named files and directories on storage devices, managing how data is laid out, located, protected, and kept consistent.

یافتن موضوع با PaperMindبه‌زودیFind papers & topics
Tools & resources
دریافت اسلایدها
Learn & explore
ویدیوبه‌زودی

Definition

A file system is the method and data structures an operating system uses to store, organize, name, retrieve, and protect persistent data on a storage device, presenting files and directories to applications while managing on-device layout and consistency.

Scope

This topic covers the file abstraction and interface, directory structures, allocation methods (contiguous, linked, indexed) and free-space management, metadata structures such as inodes, journaling and crash consistency, and the buffer cache. It treats how the OS turns raw storage into a reliable, named namespace. It excludes the physical storage devices themselves (secondary storage devices) and OS main-memory management (memory management).

Core questions

  • How are files named, organized into directories, and accessed?
  • How is a file's data allocated and located on the storage device?
  • What metadata does the file system keep, and how is free space managed?
  • How does the file system stay consistent across crashes?

Key concepts

  • file abstraction and interface
  • directories and namespaces
  • inodes and metadata
  • allocation methods (contiguous, linked, indexed)
  • free-space management
  • journaling and crash consistency
  • buffer cache
  • access control and permissions

Key theories

Crash consistency
Because a crash can interrupt multi-step updates, file systems use techniques such as journaling (logging intended changes before applying them) or copy-on-write to ensure that after a failure the file system can be restored to a consistent state.

Mechanisms

A file system maps each file's logical byte stream onto blocks on the device, recording the mapping and attributes in metadata structures such as inodes and directories. Allocation methods determine how blocks are assigned and tracked, and free-space structures record available blocks. A buffer cache holds recently used blocks in memory, and journaling or copy-on-write ensures that interrupted updates leave the file system in a recoverable, consistent state.

Clinical relevance

File systems are how nearly all persistent data is stored and retrieved, so their performance and reliability are critical to databases, applications, and users alike. Design choices around metadata, caching, and crash consistency determine durability and recovery after failures, and widely used file systems such as ext4, NTFS, and ZFS embody decades of these trade-offs.

History

Hierarchical file systems with directories and the inode model were established by UNIX around 1970. The Berkeley Fast File System improved layout and performance, and journaling and log-structured designs in the 1990s addressed crash consistency and write performance. Copy-on-write file systems such as ZFS and Btrfs later integrated checksums and snapshots for stronger integrity.

Debates

Journaling versus copy-on-write for consistency
Journaling logs intended changes before applying them, while copy-on-write writes new data to fresh locations and atomically switches pointers; each offers crash consistency with different performance, space, and integrity trade-offs, and both are used in modern systems.

Key figures

  • Ken Thompson
  • Dennis Ritchie
  • Marshall Kirk McKusick
  • Abraham Silberschatz

Related topics

Seminal works

  • silberschatz2018
  • tanenbaum2014os

Frequently asked questions

What is an inode?
An inode is a metadata structure that describes a file: its size, ownership and permissions, timestamps, and pointers to the storage blocks holding its data. Directories map human-readable names to inodes, separating a file's name from its on-device representation.
How does journaling protect against crashes?
Before modifying file-system structures, a journaling file system records the intended changes in a log. If a crash interrupts the update, on restart the system replays or discards the logged changes, restoring a consistent state rather than leaving the file system corrupted.

Methods for this concept

Related concepts