Consider a system with 2 level cahe . Access time

 Consider a system with 2 level cahe . Access times of levels 1 cache , level 2 cache and main memory are 1ns ,10 ns and 500 ns respectively. The hit rates of level 1 and level 2 caches are 0.8 and 0.9 respectiely.What is the average access time of the system ignoring the search time within the cache ?

 

9Comments
Sameer Dubey @sameerz567 12 Nov 2014 01:08 am

509.1ns

jamil @jishan 12 Nov 2014 04:29 pm

plz explain

 

 

 

Sameer Dubey @sameerz567 13 Nov 2014 12:20 pm

To understand this, you need to know the concept of Parallel access and sequential access

In parallel access, data is accessed parallelly from all the levels wheares in sequential access, data is transferred to the first level cache and then it is accessed  from the first level cache

Thus is p1, p2 is the probability that data is in level1 or level2 cache respectively then for parallel access and T1 and T2 is the data transfer times of these levels, then for parallel access, data is accessed in:

T=p1*T1 + (1-p1)*p2*T2 +(1-p1)(1-p2)*T3, where T3 is the time to access the data from last level, you can generalise this for n levels

whereas for sequential access the data is accessed using-

T=p1*T1 + (1-p1)*p2*(T1+T2) +(1-p1)(1-p2)*(T1+T2+T3), thus you can see first the data is brought to a smaller level and then it is accessed whereas in parallel it is accessed from the level it is present in.

So in this question it is not mentioned whether the organisation is to be sequential or parallel, thus by default it is parallel given they have not mentioned main memory and cache organisation, In this question it is nowhere mentioned main memory, if main memory was mentioned then by default it becomes sequential becuase all computers have sequential organisation

Generally, sequential access is used and parallel access is just a concept, but make sure if it is not mentioned in the question and also main memory cache organisation is not given then the organisation becomes parallel by default

jamil @jishan 14 Nov 2014 07:50 pm

(a) 13 ns (b) 12.8 ns (c) 12.6 (d) 12.4 ns

answer is choice (c) a/c to parallel or simultaneous memory org.

Nitesh Nikhare @nitsnikhare 14 Nov 2014 09:53 pm

yes, using parallel access answer is 12.6ns whereas using sequential access, answer is 12.78ns

Sameer Dubey @sameerz567 15 Nov 2014 12:37 pm

Answer has to be (a) becuase it is main memory here, so we use the sequential access

jamil @jishan 15 Nov 2014 04:41 pm

yes brother lots of Thanks .my answer was also 13 ns but given answer is wrong 

Bhupathi Vaibhav @kiranvaibhav 14 Dec 2014 04:16 pm

Thank you so much. This helped me a lot.

John Carter @johncarter 19 Apr 2015 12:43 pm

Sameer, You said that if "if main memory was mentioned then by default it becomes sequential" . But if you see textbook of Hamacher, (section 5.6.2) you will find they have explained the parallel concept with main memory. I have understood the concept of these two technique. But still in doubt to identify the case  when to use which one?

Please explain it once more. The below link has also the same discussion

http://stackoverflow.com/questions/21775540/calculating-average-memory-a...

Pages