DSA Factory
Free Files and disks lessonsFiles and disks · Stage 0 · Files · Step 4

Free space and crash safety

See how the OS tracks free blocks, and how a journal keeps the file system consistent after a crash. About 13 minutes.

Quick check

A journaling file system crashes after writing a committed journal record but before applying the changes. What happens at the next start?

  1. AThe journal is replayed, completing the operation
  2. BThe record is discarded and the file isn't created
  3. CThe whole disk must be scanned with fsck
Show the answer

The journal is replayed, completing the operation. A committed record is guaranteed to be applied in full.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve