OS File Systems

A File System is an integral part of an OS. A File System is a data structure that stores data and information on storage devices (hard drives, floppy disc, etc.), making them easily retrievable. Different OS’s use different file systems, but all have similar features.

The most important part of the file system is the method used to index files on the hard drive. This index allows the OS to know at any given time where to find a specific file on the hard drive. This index is most typically based on file names. Depending on the operating system there are different file systems, and thus different indexing methods.

Windows: 3 file systems

In the Windows environment, you will find one of three file systems, each with different indexing methods.

  1. The first is known as the FAT (12, 16, or 32) file system. This system uses what is known as a File Allocation Table to index the files on the disc. This file allocation table is very simple to implement and use, but can be somewhat slow. It divides hard disks into one or more partitions (parts) that become letters, like C:, D:, etc.
  2. The second file system you may encounter when using Windows is known as NTFS (New Technology File System). NTFS uses binary trees that, while complex, allow for very fast access times. It builds on the features of FAT, adds new features, and changes a few others. It is a recoverable file system, which means that it keeps track of actions in the file system.
  3. The third file system, exFAT, is a lightweight file system used primarily in flash storage applications and SD cards. It has large file size and partition size limits, which means you can store files over 4GB on a flash drive or SD card that is formatted with exFAT.

MAC OS

In the macOS environment you will find the HFS+ file system (pronounce it HFS Plus )1. As of June 2016, Apple has implemented their new file system “APFS”.  This has become the replacement for HFS+ on macOS High Sierra and onward, as well as iOS 10.3+.

Linux

Depending on which type of Linux environment you are running, you may run into several different file systems. Some of them are ext2, ext3, and ext4. XFS, JFS, and a few others are also used. ext3 is a journaling2 extension to the ext2 file system on Linux. ext4 is the successor to ext3.

Footnotes

  1. HFS + uses something known as a B-Tree to index the files on the hard discs. B-Trees (which are different than a binary tree) allow for fast access time, much like the binary tree. APFS also uses the B-Tree to index files ↩︎
  2. Journaling is a method of recording data that results in massively reduced time spent recovering a file system after a crash. XFS is very fast and also uses B-Trees for its file indexing. ↩︎