Cached and interleaved memories are ways of speeding up memory access between CPU's and slower RAM. Which memory models are best suited (i.e. improves the performance most) for which programs ?
(i) Cached memory is best suited for small loops.
(ii) Interleaved memory is best suited for small loops
(iii) Interleaved memory is best suited for large sequential code.
(iv) Cached memory is best suited for large sequential code.
UGC NET - 2012,
Answer: B
Statements (i) and (iii) are true, so the answer is (B).
A cache holds recently used words, and a small loop uses the same instructions again and again, so it runs from the cache and gains most from it (i). Interleaved memory spreads consecutive addresses across several memory banks, which can be read at the same time, so long runs of sequential code are fetched faster (iii). Statements (ii) and (iv) swap the two, and are not true, because a small loop gains little from interleaving and long sequential code is not served well by a small cache.
Please log in or register to report this question.