GATE 2014 Memory Access Time Problem: Calculating EAT with TLB Hits and Misses
Test your understanding of Translation Lookaside Buffers (TLBs) and their impact on memory access time with this detailed solution to a GATE 2014 problem. This tutorial explains how to calculate effective memory access time (EAT) considering TLB hit ratios and the time required for TLB and main memory access.
GATE 2014 Question: Calculating Effective Memory Access Time with TLB
Problem Description
This problem tests your understanding of Translation Lookaside Buffers (TLBs) and their impact on memory access time. We have a paging system with a TLB. The page table and all pages are in physical memory. It takes 10 milliseconds to search the TLB and 80 milliseconds to access main memory. The TLB hit ratio is 0.6. We need to calculate the effective memory access time (EAT).
Solution
The effective access time (EAT) is calculated by considering both TLB hits and misses:
- TLB Hit Rate: 0.6 (60%)
- TLB Miss Rate: 1 - 0.6 = 0.4 (40%)
- Time to access TLB (t): 10 ms
- Time to access main memory (m): 80 ms
If there's a TLB hit, the access time is the TLB access time plus the main memory access time (10ms + 80ms = 90ms). If there's a TLB miss, the access time includes the TLB access time, the page table access time (which is equivalent to a main memory access in this case), and the main memory access time (10ms + 80ms + 80ms = 170ms). The EAT is calculated as the weighted average of these two scenarios.
EAT = (TLB hit rate * TLB hit time) + (TLB miss rate * TLB miss time)
EAT = 0.6 * (10 + 80) + 0.4 * (10 + 80 + 80) = 0.6 * 90 + 0.4 * 170 = 54 + 68 = 122 ms
Answer
Therefore, the effective memory access time is 122 milliseconds. The correct option is B.