Problem Set Solutions/Advanced Caches/Problem01

A processor is using an 8K Byte 8-way set-associative L1 data cache with a 32-byte block size. This cache is virtually indexed and physically tagged, and the processor’s virtual address size is 64 bits but the physical address is only 48 bits.

What is the largest page size that can be used without running into aliasing problems in this L1 cache?

Solution:

The cache is virtually indexed, so to avoid aliasing the cache index bits must all come from the page offset. There are 8192 bytes in the cache and the block size is 32 bytes, so we have 256 cache lines (blocks). The cache is 8-way set-associative so we have 32 sets. The block offset is the least significant 5 bits (32-byte block), and the next 5 bits are the index, so the page size must be 1KB (2^10 bytes) or less to avoid aliasing.

The smallest page size is one block (32 bytes).