retagged by
503 views
1 votes
1 votes

This is physically addressed so We have to search in TLB first but my question is if it is a HIT in TLB why do we need to search in Cache      It should be only  TLB(hit)*{Tlb access time + memory access time} and if there is miss in TLB then we look in the cache and Secondary meory

Am I correct or Something is missing???

retagged by

1 Answer

Best answer
3 votes
3 votes

I am assuming cache physically addressed cache. 

A). TLB hit, cache hit:

1 + 1 = 2 cycles

B). TLB miss, page table hit, cache hit

1 + 5 + 1 = 7 cycles (When there is a miss in TLB, page table which is in main memory is accessed)

C). TLB miss, page table miss, cache hit

When page table misses, cache hit cannot happen. Because when a page fault happens, we shouldn't check the cache as it won't be having the data.

D). TLB miss, page table hit, cache miss

1 + 5 + 1+ 5 = 12 cycles

E). TLB miss, page table miss

1 + 5 + 100 + 1 + 1 = 108 cycles

Average memory Access time  =>

=> $0.95 \left(1 + \underbrace{0.90 \times 1}_{\text{cache hit}}+\underbrace{0.10 \left(1+5\right)}_{\text{cache miss}}\right) \text{(TLB hit)} \\+ 0.05 \left(1 + 0.99 \left(5 + \underbrace{0.90 \times 1}_{\text{cache hit}} +\underbrace{0.10\left(1+5\right)}_{\text{cache miss}}\right)\right)\text{(TLB miss, page hit)} \\ + 0.05\left(1+ 0.01 \left(5+100+\underbrace{1+1}_{\text{access restarted}}\right)\right)\text{(TLB miss, page fault)}$

=> 2.375 + 0.37175 + 0.1035

=> 2.85025 = approx 3 cycles.

edited by

Related questions

2 votes
2 votes
1 answer
2
srestha asked Mar 24, 2018
1,092 views
A memory constructed with 2B words and capacity of memory $2^{18}$ bits. Number of decoder required and type of decoder if memory built using $1K\times 4$ RAM chips?(if p...
2 votes
2 votes
2 answers
4
khushtak asked Oct 25, 2015
1,558 views
Let cache of 0.7 hit having average access time 9 times faster than that of memory.  if average access time increases 40% from 80ns. What would be new hit ratio.A. 0.72 ...