Overview of Cache Architecture Framework

There are many factors that define a Cache Architecture. Here is a framework to follow.

Where can a Block be placed?

Scheme NameNumber of SetsBlocks per Set
Direct Mapped Number of blocks in Cache 1
Set Associative Number of blocks in cache/Associativity Associativity (typically 2-16)
Fully Associative1Number of blocks in Cache

How is a Block found?

Scheme NameLocation MethodComparisions Required
Direct MappedIndex1
Set Associative Index the set, search among elements Degree of associativity
Fully AssociativeSearch all cache entriesSize of the cache

Which Block is replaced?

RandomPseudorandom block numbers
FIFOOldest block
NMRU Randomly selected from all blocks except the LRU
LRUBlock that has been unused for the longest time

What happens on a Write?

Write-throughUpdate Cache and MemoryNo-write Allocate
Write-backUpdate only CacheWrite Allocate

Design Changes

Design ChangeEffect on Miss Rate Possible negative perfor- mance effect
Increase Cache SizeDecreases Capacity MissesMay increase Access Time
Increase AssociativityDecreases Miss Rate due to Conflict MissesMay increase Access Time
Increase Block SizeDecreases miss Rate for a wide range of Block Sizes due to Spatial LocalityIncreases Miss Penalty. Very large Block could increase Miss Rate

Leave a Reply

Your email address will not be published. Required fields are marked *