Cache placement policies

[2][3] There are three different policies available for placement of a memory block in the cache: direct-mapped, fully associative, and set-associative.

Originally this space of cache organizations was described using the term "congruence mapping".

Based on the address of the memory block, it can only occupy a single cache line.

The incoming address to the cache is divided into bits for Offset, Index and Tag.

The incoming address to the cache is divided into bits for offset and tag.

The incoming address to the cache is divided into bits for Offset, Index and Tag.

Below are memory addresses and an explanation of which cache line on which set they map to: Other schemes have been suggested, such as the skewed cache,[8] where the index for way 0 is direct, as above, but the index for way 1 is formed with a hash function.

[10] A true set-associative cache tests all the possible ways simultaneously, using something like a content-addressable memory.

Direct-Mapped Cache
Fully associative cache
Set-Associative Cache