Master the fundamental concepts of storage fundamentals through this focused micro-challenge.
On HDDs the seek time is fixed whether you read 4KB or 1MB afterward. Large sequential reads spread that penalty across many bytes, so effective latency per byte drops. This is why database sequential scans and log append prefer big read sizes on spinning rust.
Total time = seek + rotation + (bytes / throughput). Per-byte cost = total / bytes.
cLoading…
Keep the relevant documentation open while you implement. When your output disagrees with the reference, trace one failing case by hand before changing random lines.
You will calculate per-operation and per-byte latency for several request sizes on HDD and SSD models. This exercise requires showing how bigger I/O amortizes mechanical costs.
Write a C program that models how I/O size affects throughput on HDDs and SSDs.
Requirements:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github