CLICK HERE TO DOWNLOAD PPT ON CACHE MEMORY
Cache Memory Presentation Transcript
1. Cache Memory
2. Contents:
1. Introduction
2. Cache memory in system
3. Features of cache
4. Basic operation
5. Performance of cache 6. Address relation between main and cache memory
7. Mappings – Associative mapping – Direct mapping – Set-associative mapping.
8. Writing into cache
9. Cache initialization
10. Advantages and Disadvantages of cache.
3. Introduction
• Cache memory is extremely fast memory that is built into a computer’s CPU, or located on a separate chip.
• The CPU uses cache memory to store instructions that are repeatedly required to run programs, improving overall system speed.
• It is work on the principle Locality of reference.
4. Cache memory in system
5. Features of cache
• The access time is faster than main memory.
• The cache is placed on the top in the memory hierarchy.
• The cache organization is concerned with memory write requests.
• The cache is initialized when the main memory is loaded with a complete set of programs.
• Cache built into the CPU itself is referred to as Level 1 (L1) cache.
• Cache that resides on a separate chip is called Level 2 (L2). Eg:SRAM
6. Basic operation
7. Performance of cache
• The performance of cache memory is measured by Hit Ratio
. • When the CPU refers to memory and finds the word in cache,it counts as hit.If the word is not found then it counts as miss.
• Then we calculate Hit Ratio :-This ratio verifies the validity of the locality of references property.
• Hit Ratio=(total hit)/(total CPU references to memory) • Hit Ratio=(total hit)/(total hit +total miss).
• Hit Ratio of 0.9 and higher have been reported.
8. Address relation between main and cache memory
9. Mapping
• Mapping:- The transformation of data from main memory to cache memory is referred to as a mapping process
. • Types of mapping:-
1.Associative mapping
2.Direct mapping
3.Set-associative mapping.
10. Associative mapping
11 Direct mapping
12. Set-associative mapping
13. Writing into Cache
• Two ways:
1. Write-through:-In this method we update main memory with every write operation.
The main memory contains same data as the cache.
2. Write-back:-In this method only the cache location is updated during a write operation.
14. Cache initialization
• The cache is initialized when the main memory is loaded with a complete set of programs from auxiliary memory.
• After cache initialization the cache is considered to be empty,and a valid bit is included with each word in cache.
• The cache is initialized by clearing all the valid bits to 0.
• The valid bit is set to 1 the first time any words is loaded and it still set until cache is again initialized.
15. Advantages and Disadvantages of cache Advantages:-
• It is the fastest memory in the system
. • cache is so effective in system performance
• The CPU does not have to use the motherboard’s system bus for data transfer.
• The CPU can process data much faster by avoiding the bottleneck created by the system bus
• programs can operate more quickly and efficiently
Disadvantage:-
• Cache is more expensive than RAM.
0 comments