IO Cost Model Reference Sheet

Official Formula Reference

This is your go-to guide for IO cost calculations in CS145. Stick to these formulas and notations for every problem and solution.

📄 Download Formula Reference PDF

Quick Reference

Core Formula

IO Cost per Page:

C_r = Access Time + (Page Size ÷ Scan Speed)
C_w = Access Time + (Page Size ÷ Scan Speed)

Total IO Cost:

Total Cost = numPages × C_r  (for reads)
Total Cost = numPages × C_w  (for writes)

Key Variables

Device Specifications (2024)

These numbers are your baseline for problem sets and tests. Real-world figures vary by manufacturer.

Device Access Time Scan Speed C_r (64MB page) C_w (64MB page)
RAM 100 ns 100 GB/s 0.00064s 0.00064s
SSD 10 μs 5 GB/s 0.01281s 0.01281s
HDD 10 ms 100 MB/s 0.65s 0.65s
Network 1 μs 10 GB/s 0.00641s 0.00641s

Unit Conventions

MB, GB = Decimal units (1000-based): 1 MB = 1,000,000 bytes, 1 GB = 1,000,000,000 bytes
MiB, GiB = Binary units (1024-based): 1 MiB = 1,048,576 bytes, 1 GiB = 1,073,741,824 bytes

All CS145 problems use MB/GB (decimal) consistently for calculations.

This reference sheet is your constant companion for all system problems and solutions.