0% found this document useful (0 votes)
230 views1 page

Cache 3 Associativity Handout

The document discusses different types of cache associativity: direct mapped caches allow a cache block to only be placed in one spot; set associative caches group blocks into sets with 2 or more slots; and fully associative caches allow blocks to be placed anywhere without an index. It notes that direct mapped caches are actually a subset of set associative caches with only one way, and that fully associative caches are equivalent to set associative caches with as many ways as blocks.

Uploaded by

Sambhav Verman
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views1 page

Cache 3 Associativity Handout

The document discusses different types of cache associativity: direct mapped caches allow a cache block to only be placed in one spot; set associative caches group blocks into sets with 2 or more slots; and fully associative caches allow blocks to be placed anywhere without an index. It notes that direct mapped caches are actually a subset of set associative caches with only one way, and that fully associative caches are equivalent to set associative caches with as many ways as blocks.

Uploaded by

Sambhav Verman
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Cache Associativity

Just as bookshelves come in different shapes and sizes, caches can also take on a variety of forms and capacities. But no matter how large or small they are, caches fall into one of three categories: direct mapped, n-way set associative, and fully associative.

Direct Mapped
Memory Address

Tag

Index

Offset

A cache block can only go in one spot in the cache. It makes a cache block very easy to find, but its not very flexible about where to put the blocks.

2-Way Set Associative


Tag Index Offset

This cache is made up of sets that can fit two blocks each. The index is now used to find the set, and the tag helps find the block within the set.

4-Way Set Associative


Tag Index Offset Each set here fits four blocks, so there are fewer sets. As such, fewer index bits are needed.

Fully Associative
Tag Offset No index is needed, since a cache block can go anywhere in the cache. Every tag must be compared when finding a block in the cache, but block placement is very flexible!
They all look set associative to me...

Thats because they are! The direct mapped cache is just a 1-way set associative cache, and a fully associative cache of m blocks is an m-way set associative cache!

You might also like