Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this assignment, you will use the Macsim simulator for cache simulation. You will simulate two different cache replacement policies in two different cache configurations.
In this assignment, you will use the Macsim simulator for cache simulation. You will simulate two different cache replacement policies in two different cache configurations. You need to collect two types of statistics per each run: - Miss Rate: Rate of number of cache misses to the number of cache accesses. - Hit Rate: Rate of number of cache hits to the number of cache accesses. You will simulate two different policies: Least Frequently Used (LFU), and First In First Out (FIFO). Whenever some data is brought from the memory, a cache line must be evicted in order to make room for the new data. These policies determine which cache lines will be evicted from the cache upon a cache miss. - LFU: The line which has the oldest last access time is evicted. This is the default behaviour of the simulator; you can collect data for this policy without modifying the source code. - FIFO: This is a very simple replacement policy, and is also known as a round robin. The way it works is once the cache is full it simply replaces the first line that was placed in the cache with the desired line, and the next replacement will be the second line placed in the cache and so on. You will work only on level one (L1) data cache. Three configurations you will use are: - 64 set, 2-ways - 32 set, 4-ways 1. First, read the document on Macsim (macsim.docx) carefully. 2. Run Macsim with LRU policy for two different cache configurations. At each run change cache configuration in params.in 3. Change access_cache() function in cache.cc to collect data on Hit Rate and Miss Rate. Also, change finalize) function in macsim.cc to print these statistics. 4. Run Macsim with LRU and FIFO policies for two different cache configurations. You need to change access_cache() and find_replacement_line() functions in cache.cc to modify the cache policy. 5. After completing all simulations and collecting data, write a report. Your report must include charts which demonstrate all statistics gathered. Your report should also include your analyses and observations of the results. Compare the two cache configurations for two replacement policies. Submit your report in the format NAME_SURNAME.pdf. In grading, your analysis will be more important than the numerical results
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started