retagged by
1,316 views
4 votes
4 votes

@Arjun sir, I solved it by using the same concept of gate 2003 78,79 ..but techtud marked it as wrong..this qs has only one confusion which is how to use page table walk and tlb update...I used it in the part of L3 ache miss of Tlb miss.. and used this formula ... 

Tavg = Tlb hit( Tlb time +L1 hit (cache time) + L1 miss(L2 hit(cache time) + L2 miss( L3 hit (cache time) + L3  miss(cache time+memory time ))))

+ Tlb miss(Tlb time + Memory time + L1 hit (cache time) + L1 miss(L2 hit(cache time) + L2 miss( L3 hit (cache time) + L3  miss(cache time+page table walk and Tlb update ))))

Sir,pls check this

retagged by

2 Answers

Best answer
4 votes
4 votes

Problem of using formula- we must know what's the use of a page table. It is to get actual physical address. TLB is a quick look-up for page table. 

Regarding question- it's a really well framed question like in GATE. Only issue is for me to read the small font. 

So, memory access works like this - First look in cache and then go to RAM. But before looking in cache we need physical address- because cache uses physical address as given in question. (it can use virtual addressing or virtually index and physical tag also but this question is clear- physical index, physical tag). 

Now what happens when a TLB miss happens? We look in page table which is in main memory. Can this page table be cached? Yes, quite often. So, determining the time becomes complex. But see the question- it directly gives the time during a TLB miss- so we are saved. Page walk just means looking up in page table. 

If you haven't understood so far I suggest to better skip this portion for GATE. There is no use other than getting negative if you read below without understanding above. 

Average memory access time = Avg. address translation time + Avg. data access time

$= \left(0.95 \times 1 + 0.05 \times (1+200)\right) +  0.95 \times 1 + 0.05 \times 0.80 \times (1 + 8 )+ 0.05 \times 0.2 \times 0.5 \times (1+8+50) + 0.05 \times 0.2 \times 0.5 \times (1+8+50+100) 
\\= 11 + 0.95 + 0.36 + 0.295+0.795
\\=13.40 ns$

edited by
8 votes
8 votes

Time = TLB access time + Miss rate TLB * TLB update time + L1 access time + Miss Rate L1 * L2 Access Time + Miss Rate of L1 * Miss Rate L2 * L3 Access Time +  Miss rate L3 * Memory Access time

= 1 + 0.05*200 + 1 + 0.05*8 + 0.05*0.20*50 + 0.50*0.20*0.50*100
= 1 + 10 + 1 + 0.40 + 0.50 + 0.50
= 13.40 ms

Related questions

4 votes
4 votes
1 answer
2
UK asked Dec 16, 2015
1,710 views
I have a doubt which is accessed first TLB or cache?I think answer should be TLB as we need it for address translation to get frame no. and then access cacheIs my approac...
0 votes
0 votes
2 answers
3
pC asked Jan 25, 2016
3,824 views
Suppose TLB used in one level paging system with each look-up time of TLB 40 msec. Memory reference takes 120 msec. If the effective memory reference time is 180 msec the...