Modern Computer Architecture and Organization

Modern Computer Architecture and Organization, by Jim Ledin. Published by Packt Publishing.


Chapter 8, Exercise 2

Consider an 8-way set associative L2 cache of 256KB, with 64 bytes in each cache line. How many sets are in this cache?

Answer

The number of lines in the cache is 262,144 ÷ 64 = 4096.

Each set contains 8 lines.

The number of sets = 4096 lines ÷ 8 lines per set = 512 sets