Analyze the relation between the locality reference concept and the cache memory.
- locality of reference: analysis of large number of typical programs has shown that reference to memory at any given interval of time.
- Using the concept of locality of reference, we can place the active portion of the program and data in a fast small memory (cache memory).
- Cache memory: is placed between main memory and the CPU.
Clarify the basic operation of the cache memory.
- When CPU needs to access memory, cache memory check if the cache contains this word or not.
- The main memory is accessed to read the word.
- A block of words containing the one just accessed is then transferred from the main memory to the cache memory
- Data related to this word is transferred such that the next reference to memory find its needs
Assignment 14
Compute the hit ratio for the Cache memory if the CPU hits it 4420 times and miss it 80 times during a total of 4500 reference to the main memory. If the time per hit is ≃ 100ns, time per miss is ≃ 300ns. Compute the effective access time of the cache memory.
Solution