The fsync interval
write said the record was saved. The power cut a moment later. Is it on disk, and what did confirming it cost?
A program appends small records to a file. Each write lands in memory and returns at once. The disk gets them only when the program asks for an fsync. Choose how often to ask, then cut the power. The panels show records written a second, records the crash took, and which ones had reached the disk.
Included with a plan
This lab is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
See plansAlready a member? Sign in
Or start free: a free account opens lessons 2 and 3 of every track.
the lesson I/O, Interrupts & the Bus
The whole idea this lab came from, told start to finish.
on the path Module 3 of 7 in How Computers Work: Many programs, one machine
The lessons, boards and videos around this lab, in reading order.
see also ARIES: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead Logging in Papers.