Cache Memory
Cache Memory
Maninder Kaur
[email protected]
www.eazynotes.com
24-Nov-2010
www.eazynotes.com
24-Nov-2010
www.eazynotes.com
24-Nov-2010
Hit Ratio
The ratio of the total number of hits divided by the
www.eazynotes.com
24-Nov-2010
Example
A system with 512 x 12 cache and 32 K x 12 of
main memory.
www.eazynotes.com
24-Nov-2010
1.
Direct Mapping
2.
Associative Mapping
3.
www.eazynotes.com
24-Nov-2010
1. Direct Mapping
The direct mapping technique is simple and inexpensive to
implement.
When the CPU wants to access data from memory, it places a
cache, then there is a hit and the required data word is read from
cache.
If there is no match, then there is a miss and the required data
www.eazynotes.com
24-Nov-2010
1. Direct Mapping
www.eazynotes.com
24-Nov-2010
1. Direct Mapping
www.eazynotes.com
24-Nov-2010
2. Associative Mapping
An associative mapping uses an associative
memory.
This memory is being accessed using its
contents.
Each line of cache memory will accommodate the
www.eazynotes.com
24-Nov-2010
2. Associative Mapping
11
www.eazynotes.com
24-Nov-2010
www.eazynotes.com
24-Nov-2010
13
www.eazynotes.com
24-Nov-2010
14
www.eazynotes.com
24-Nov-2010
(schemes) are:
Write-Through
Write-Back
15
www.eazynotes.com
24-Nov-2010
Write-Through
In a write through cache, the main memory is
www.eazynotes.com
24-Nov-2010
Write-Back
In a write back scheme, only the cache memory is
www.eazynotes.com
24-Nov-2010
18
24-Nov-10
www.eazynotes.com