[ The PC Guide | Systems and Components Reference Guide | Motherboard and System Devices | System Cache
| Cache Characteristics ]
Mapping Technique
The cache mapping technique is another factor that determines how effective the cache
is, that is, what its hit ratio and speed will be. This is
discussed in detail in this section, but briefly, the three types are:
- Direct Mapped Cache: Each memory location is mapped to a single cache line that
it shares with many others; only one of the many addresses that share this line can use it
at a given time. This is the simplest technique both in concept and in implementation.
Using this cache means the circuitry to check for hits is fast and easy to design, but the
hit ratio is relatively poor compared to the other designs because of its inflexibility.
Motherboard-based system caches are typically direct mapped.
- Fully Associative Cache: Any memory location can be cached in any cache line.
This is the most complex technique and requires sophisticated search algorithms when
checking for a hit. It can lead to the whole cache being slowed down because of this, but
it offers the best theoretical hit ratio since there are so many options for caching any
memory address.
- N-Way Set Associative Cache: "N" is typically 2, 4, 8 etc. A compromise
between the two previous design, the cache is broken into sets of "N" lines
each, and any memory address can be cached in any of those "N" lines. This
improves hit ratios over the direct mapped cache, but without incurring a severe search
penalty (since "N" is kept small). The 2-way or 4-way set associative cache is
common in processor level 1 caches.
Next: Write Policy
Home - Search
- Topics - Up
|