ZCache aims to reduce conflict misses by improving associativity without increasing the number of physical cache ways. In this project, I implemented ZCache using the GEM5 simulator and compared its performance to set associative and skewed associative caches across various cache ways, sizes, and SPEC 2017 benchmarks. The core insight of ZCache is that the number of replacement candidates determines associativity; therefore, it uses a series of hash functions to boost the number of replacement candidates. Specifically, for an N-way cache, the design generates N² replacement candidates through two levels of hashing, as illustrated in Figure 1.
Figure 1: Two levels of replacement candidates for a new cache entry.
I evaluated the implementation by measuring cache miss rates and Instructions Per Cycle (IPC). The results indicated that for configurations where conflict misses constituted a significant portion of cache misses, ZCache reduced the miss rate by 27.06% compared to set associative caches. In these same configurations, ZCache improved IPC by 15.58% compared to set associative caches. However, when compared to skewed associative caches, the performance improvement was more marginal, with a 1.98% reduction in miss rate. This suggests that while ZCache is highly effective at reducing conflict misses compared to standard set associative designs, skewed associative caches also perform well in this regard.