If main memory access time is 400 μs, TLB access time is 50 μs, considering TLB hit as 90%, what will be the overall access time?
490 μs
Let's break down how to calculate the overall memory access time when a Translation Lookaside Buffer (TLB) is involved. The TLB is a special cache that stores recent translations of virtual page numbers to physical frame numbers, speeding up address translation.
The TLB miss rate is the percentage of times the required page translation is not found in the TLB. It is calculated as:
\( \text{Miss Rate} = 1 - \text{Hit Rate} \)
Given the hit rate is 90% (or 0.90), the miss rate is:
\( \text{Miss Rate} = 1 - 0.90 = 0.10 \)
So, the miss rate is 10%.
The overall access time, often called the Effective Access Time (EAT), depends on whether a TLB hit occurs or a TLB miss occurs.
If the translation is found in the TLB (TLB hit), the steps are:
Total time for a TLB hit: TLB Access Time + Main Memory Access Time = 50 \(\mu\)s + 400 \(\mu\)s = 450 \(\mu\)s.
If the translation is not found in the TLB (TLB miss), the steps are:
Total time for a TLB miss: TLB Access Time + Main Memory Access Time (for page table) + Main Memory Access Time (for data) = 50 \(\mu\)s + 400 \(\mu\)s + 400 \(\mu\)s = 850 \(\mu\)s.
This can also be written as: TLB Access Time + 2 \(\times\) Main Memory Access Time.
The EAT is the weighted average of the access times for hits and misses:
\( EAT = (\text{Hit Rate} \times \text{Time for Hit}) + (\text{Miss Rate} \times \text{Time for Miss}) \)
Substituting the values:
\( EAT = (0.90 \times (50 \ \mu\text{s} + 400 \ \mu\text{s})) + (0.10 \times (50 \ \mu\text{s} + 400 \ \mu\text{s} + 400 \ \mu\text{s})) \)
\( EAT = (0.90 \times 450 \ \mu\text{s}) + (0.10 \times 850 \ \mu\text{s}) \)
Calculate the contribution from TLB hits:
\( 0.90 \times 450 \ \mu\text{s} = 405 \ \mu\text{s} \)
Calculate the contribution from TLB misses:
\( 0.10 \times 850 \ \mu\text{s} = 85 \ \mu\text{s} \)
Add the contributions to find the total EAT:
\( EAT = 405 \ \mu\text{s} + 85 \ \mu\text{s} \)
\( EAT = 490 \ \mu\text{s} \)
Thus, the overall memory access time considering the TLB hit rate is 490 \(\mu\)s.
| Parameter | Value |
|---|---|
| Main Memory Access Time | 400 \(\mu\)s |
| TLB Access Time | 50 \(\mu\)s |
| TLB Hit Rate | 90% (0.90) |
| TLB Miss Rate | 10% (0.10) |
| Time on TLB Hit | TLB Access + Main Memory Access = 50 + 400 = 450 \(\mu\)s |
| Time on TLB Miss | TLB Access + Main Memory Access (Page Table) + Main Memory Access (Data) = 50 + 400 + 400 = 850 \(\mu\)s |
| Effective Access Time (EAT) | (Hit Rate * Time for Hit) + (Miss Rate * Time for Miss) |
| Calculated EAT | (0.90 * 450) + (0.10 * 850) = 405 + 85 = 490 \(\mu\)s |
The TLB is a crucial component in systems that use virtual memory. Virtual memory allows a process to use more memory than is physically available in the main memory. It divides memory into fixed-size blocks called pages (in virtual memory) and frames (in physical memory).
If a memory partition of size 80k is allocated to a process of size 60k then the 20k of the partition is wasted and cannot be allocated to any process. It is called _______.
Which of the following is NOT a base of product related segmentation?
The purpose of a page table in a paging system is to:
Consider a single-level page table system. with the page table stored in the memory. If the hit rate to TLB is 80%, and it takes 15 nanoseconds to search the TLB. and 150 nanoseconds to access the main memory, then what is the effective memory access time, in nanoseconds ?
Dirty bit is used to show the