lec15_Claculation_Improving_Cache_Performance

lec15_Claculation_Improving_Cache_Performance - Lecture 15...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 15 Calculating and Improving Cache Perfomance Prof. H. Shaban Computer Architecture CSC 205
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Cache Performance Measures Hit rate : fraction found in the cache So high that we usually talk about Miss rate = 1 - Hit Rate Hit time : time to access the cache Miss penalty : time to replace a block from lower level, including time to replace in CPU access time : time to acccess lower level transfer time : time to transfer block Average memory-access time (AMAT) = Hit time + Miss rate x Miss penalty (ns or clocks)
Image of page 2
Calculating AMAT If a direct mapped cache has a hit rate of 95%, a hit time of 4 ns, and a miss penalty of 100 ns, what is the AMAT? AMAT = Hit time + Miss rate x Miss penalty = 4 + 0.05 x 100 = 9 ns If replacing the cache with a 2-way set associative increases the hit rate to 97%, but increases the hit time to 5 ns, what is the new AMAT? AMAT = Hit time + Miss rate x Miss penalty = 5 + 0.03 x 100 = 8 ns
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Split vs. Unified Cache Unified cache (mixed cache): Data and instructions are stored together (von Neuman architecture) Split cache: Data and instructions are stored separately (Harvard architecture) Why do instructions caches have a lower miss ratio? Size Instruction Cache Data Cache Unified Cache 1 KB 3.06% 24.61% 13.34% 2 KB 2.26% 20.57% 9.78% 4 KB 1.78% 15.94% 7.24% 8 KB 1.10% 10.19% 4.57% 16 KB 0.64% 6.47% 2.87% 32 KB 0.39% 4.82% 1.99% 64 KB 0.15% 3.77% 1.35% 128 KB 0.02% 2.88% 0.95%
Image of page 4
Example: Split vs. Unified Cache Which has the lower average memeory access time? Split cache : 16 KB instructions + 16 KB data Unified cache: 32 KB instructions + data Assumptions Use miss rates from previous chart Miss penalty is 50 cycles Hit time is 1 cycle On the unified cache, a load or store hit takes an extra cycle, since there is only one port for instructions and data
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern