Effective Access Time with Paging
You'll learn: How to calculate the average time needed to access memory when using paging with a TLB.
The Core Idea
When your program accesses memory with paging enabled, there are multiple possible paths—and each takes different amounts of time. Sometimes you get lucky with a TLB hit (fast!), other times you suffer a TLB miss and must walk the page table (slower). The effective access time is the weighted average of all these scenarios based on how often each occurs.
Think of it like your morning commute: sometimes all lights are green (TLB hit), sometimes you hit every red light and take detours (TLB miss + page table lookup). Your average commute time depends on how often each happens.
The Formula
Effective Access Time (EAT) combines:
- TLB access time (very fast, usually 1-2 ns)
- Memory access time (slower, maybe 100 ns)
- TLB hit ratio (percentage of TLB hits, often 80-99%)
The calculation:
EAT = (TLB hit ratio × TLB hit time) + (TLB miss ratio × TLB miss time)
Where:
- TLB hit time = TLB access + one memory access
- TLB miss time = TLB access + page table access + memory access
Example
If TLB access = 2 ns, memory access = 100 ns, and TLB hit ratio = 90%:
- TLB hit: 2 + 100 = 102 ns
- TLB miss: 2 + 100 + 100 = 202 ns
- EAT = 0.9(102) + 0.1(202) = 91.8 + 20.2 = 112 ns
Even a 90% hit ratio adds noticeable overhead compared to the ideal 100 ns!
Key Takeaway: Effective access time quantifies the real-world memory performance impact of paging, showing why high TLB hit ratios are critical for system speed.