← Back
Home › Systems › Operating systems and runtimes

filesystem

local file system

ext4, ZFS, APFS

SystemTechniques · 4Primitives · 24 filesystem Copy on write b treestorage · medium: Append-only/shadow-paging B+tree: copy the root-to-leaf path on write, atomic root swap (LMDB style)Crash consistency orderingstorage · medium: Ordered writes, barriers and FUA so on-disk state is valid after power loss at any pointErasure codingstorage · medium: Reed-Solomon k+m coding to survive m lost shards at lower overhead than replicationAdaptive replacement cachesystems · medium: ARC: balances recency and frequency lists with ghost entries; self-tuning, scan-resistant cachefsync, O_DSYNC and O_DIRECThardware-os · low: What fsync, fdatasync, O_DSYNC, O_DIRECT and F_FULLFSYNC really guarantee on Linux and macOS, and the exact call sequences for crash-safe files.›B+ treestorage · low: Balanced high-fanout search tree with all values in linked leaves; the default on-disk index for point lookups and range scans.›Free space managementstorage · low: Free-space bitmaps, extent B-trees and space maps; allocation policies and fragmentationWrite-ahead logstorage · low: Append each change to a checksummed sequential log and fsync it before touching data pages; the basis of crash durability in nearly every database.›LZ4compression · low: Byte-aligned LZ77 with no entropy stage; compresses at hundreds of MB/s and decompresses at several GB/s per core, for when speed beats ratio.›Zstandard (zstd)compression · low: LZ77 plus Huffman and FSE entropy coding, with levels from LZ4-like speed to xz-like ratio, all decoding at about 1-2 GB/s.›RCU (read-copy-update)concurrency · low: Readers access shared data with no locks or atomic writes; writers publish a new copy and free the old one after a grace period.›Merkle treedata-structures · low: Hash tree for verifying and diffing large datasets with logarithmic proofsCRC32C checksumshardware-os · low: The Castagnoli CRC-32 with dedicated instructions on x86 (SSE4.2) and ARMv8. It is the standard fast integrity check for storage blocks, logs and network frames.›mmap and the page cachehardware-os · low: How read() and mmap reach file data through the kernel page cache, what readahead and madvise do, and why databases use their own buffer pool instead.›SSD and NVMe internalshardware-os · low: NAND pages and erase blocks, the FTL, garbage collection and write amplification, NVMe queues and queue depth, and 4 KiB alignment, with the numbers that matter.›Content-addressed storagestorage · low: Store each blob under the hash of its bytes: immutable, deduplicated by construction, self-verifying on every read, and composable into Merkle trees.›Extent treesstorage · low: Map file ranges to disk extents in a shallow B-tree (ext4, XFS)Atomic file replacementhardware-os · low: Write temp file, fsync, rename over target, fsync directory: crash-safe whole-file updatesSIMD programminghardware-os · low: Process 4-16 lanes per instruction with AVX2, AVX-512 or NEON via Rust std::arch, with runtime dispatch and a portable fallback.›Finite field arithmeticnumerics · low: Prime-field and extension-field arithmetic (Montgomery form, Goldilocks, BabyBear), vectorized+ 8 more primitives

Similar systems

Share the most building blocks with this one.