Machine-translated by Google. Questions are authored in English.
Top

Discussion

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.

  • A.(i) and (ii) are true.
  • B.(i) and (iii) are true.
  • C.(iv) and (ii) are true.
  • D.(iv) and (iii) are true.

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.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.