- Cache memories are orgainized into a fixed number of sets.
- Each set has a fixed number of blocks of size B bytes.
Each block can hold a copy of B bytes from main memory.
Each block also has an storage for an associated tag and a valid bit.
- A cache line consists of the valid bit, the tag and the data block.
- The number of cache lines per cache set determines the
associativity of the cache.
A direct mapped cache has 1 line per set.
A 2-way associative cache has 2 lines per set.
A fully associative cache has only 1 set and as many lines as the total cache memory can hold.