A computer architecture project implementing and analyzing classical and novel cache replacement policies within the ChampSim simulator.
This repository contains the source code and report for a university project focused on evaluating the performance of different cache replacement algorithms. The project extends the ChampSim simulator, a trace-based CPU cache hierarchy simulator, to include several policies. Their performance is measured and compared using standard metrics like Miss Rate, Hit Rate, and Cumulative IPC.
The following cache replacement policies have been implemented and evaluated:
- LRU (Least Recently Used): Evicts the block that has not been accessed for the longest time.
- LFU (Least Frequently Used): Evicts the block that has been accessed the least number of times.
- MRU (Most Recently Used): Evicts the block that was accessed most recently.
- FIFO (First-In, First-Out): Evicts the block that has been in the cache the longest, regardless of access patterns.
- ETA (Estimated Time of Access) / Paper-Based Policy: A novel policy based on the paper "A Low-cost Predictor-based Cache Replacement Policy for Last-Level Caches". It predicts the reuse distance of cache lines to make smarter eviction decisions.
The project report (in Persian) provides a detailed analysis of the results, including:
- Comparison of Miss Rate and Hit Rate for each policy.
- Analysis of Cumulative IPC (Instructions Per Cycle).
- Discussion on the hardware complexity and cost of implementing the novel ETA policy.
- Conclusions on the effectiveness of each algorithm in different caching layers.