8-Memory - II

8-Memory - II - Memory II Presenter Tathagata Bhattacharjee...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Tathagata Bhattacharjee 1 Memory - II Presenter Tathagata Bhattacharjee
Background image of page 1

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 2 Cache CPU CPU Cache Cache Main Memory Main Memory B l o c k T r a n s fe W d f e
Background image of page 2
Tathagata Bhattacharjee 3 Cache • The memory hierarchy is the solution to a need for unlimited fast memory –Each level based (at least in part) on Principle of Locality of Reference –As we move higher in the hierarchy, each level gets faster but also more expensive, therefore it is more restricted in size • Some issues are generic across the hierarchy • But, each level has its unique characteristics, technology and solutions
Background image of page 3

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 4 –The main problem with main memory is that it is much slower then CPU/register/cache speeds •CPU speed is increasing at a much faster rate than memory speed is increasing
Background image of page 4
Tathagata Bhattacharjee 5 Effects on memory speed • Memory speed has a direct effect on CPU performance as indicated by: CPU execution time = (CPU clock cycles + memory stall cycles) * clock cycle • where memory stall cycles = instruction count * memory references per instruction * miss rate * miss penalty – memory references per instruction > 1 since there will be the instruction fetch itself, and possible 1 or more data fetches • i.e, whenever an instruction or data is not in registers, we must fetch it from cache, but if it is not in cache, we must seek it out in memory and a miss penalty – If the miss penalty is high then we have a tangible impact on CPU execution time
Background image of page 5

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 6 Example •A s s um e – CPI = 1.0 when all memory accesses are hits – Only data accesses are during loads and stores – 50% of all instructions are loads and stores – Miss penalty is 25 clock cycles – Miss rate is 2% • How much faster would the computer be if all cache accesses were hits?
Background image of page 6
Tathagata Bhattacharjee 7 Four questions • The general piece of memory will be called a block – Blocks differ in size depending on the level of the memory hierarchy • cache block, memory block, disk block • We ask the following questions pertaining to both cache, main memory and disk: – Q1: where can a block be placed? – Q2: how is a block found? – Q3: which block should be replaced on a miss? – Q4: what happens on a write?
Background image of page 7

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 8 Caches • Cache is made from SRAMs • SRAM is faster but much more expensive • Cache acts as an intermediate between registers and main memory in the memory hierarchy • Three types of caches: – Direct mapped cache – Associative cache – Set-associative cache • Now-a-days, we usually have two caches – one for instructions – one for data – two separate ports from CPU to the caches
Background image of page 8
9 Q1: Where can a block be placed? • Type determines placement:
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 58

8-Memory - II - Memory II Presenter Tathagata Bhattacharjee...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online