Latest Posts

Latest Posts

How CPU Caches Work: Lines, Associativity, and False Sharing

A load that misses DRAM can cost hundreds of cycles. A load that hits L1 often costs a handful. That gap is why two programs with the same b...

Sarthak Bystander 18 Sept, 2026

How mmap Works: File-Backed Pages, MAP_PRIVATE, and Why Zero-Copy Matters

How mmap Works: File-Backed Pages, MAP_PRIVATE, and Why Zero-Copy Matters A process that wants the contents of a 4 GB file does not have to...

Sarthak Bystander 17 Sept, 2026

How MVCC Works: Snapshots, Version Chains, and Why Readers Don't Block Writers

A long-running report wants a consistent view of every row it started reading. A checkout wants to update one of those rows at the same mome...

Sarthak Bystander 16 Sept, 2026

How Two-Phase Commit Works: Prepare, Decision, and Why Blocking Happens

A payment service writes a debit. An inventory service reserves a unit. Either both must become durable facts, or neither may. That is an at...

Sarthak Bystander 15 Sept, 2026

How LSM-Trees Work: Memtables, SSTables, and Compaction

A B-tree updates a leaf in place. That is the right shape when most work is point lookups on a working set that already lives on disk. It is...

Sarthak Bystander 14 Sept, 2026

How Write-Ahead Logging Works: Durability Before Data Pages Hit Disk

A committed row that vanishes after a power cut is a broken contract. The database promised durability. RAM is fast and volatile. Disk pages...

Sarthak Bystander 13 Sept, 2026

How Bloom Filters Work: Hash Bits, False Positives, and Why Deletion Is Hard

A cache, a database, and a CDN edge often need the same cheap answer: have I seen this key before? Storing every key is correct and expensi...

Sarthak Bystander 12 Sept, 2026

How System Calls Work: User Mode, Kernel Mode, and Crossing the Boundary

A user program cannot talk to a disk controller, change another process's page tables, or bind a TCP port by executing ordinary instruct...

Sarthak Bystander 11 Sept, 2026