IO Cost Model Reference Sheet

Official Formula Reference

This is the authoritative reference for all IO cost calculations used in CS145. Use these formulas and notations in all problems and solutions.

📄 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 are good ballpark numbers. Also, easy for math in Tests. In practice, different manufacturers will have different costs and speeds for commercial servers.

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

📏 Important Unit Distinction:
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.

Usage in Problems

When solving IO cost problems, always:

  1. Identify the device type (RAM, SSD, HDD)

  2. Determine access pattern (sequential vs random)

  3. Calculate numPages needed

  4. Apply the appropriate formula with C_r or C_w

  5. Consider cache hierarchies if applicable


This reference sheet is used throughout all system problems and solutions.