CSC252 Assignment 6
Thu Apr 18 15:36:17 EDT 1996
In this final assignment we are going to simulate a simple cache system and evaluate the performance of our simple sorting program for different cache organizations. Assume you are trying to sort 65536 randomly generated integers amd the total amount of cache space available to you is 16 Kbytes. Also assume that each instruction takes a single processor cycle with the exception of memory references.
Memory references that hit in the cache take a single cycle, while memory references that miss in the cache incur a 20-cycle fixed penalty plus 10 cycles per word transferred. You are supposed to simulate direct-mapped and two-way set-associative caches with single- and four-word cache lines. Assume that the replacement policy for the two-way set-associative cache within a set is random. What is the miss rate for each of the four possible cache configurations? What about the run time of the program?
In this assignment you no longer need the -t i flag since you are going to ignore instructions that do not reference memory (Mint assumes that they take a single cycle unless you explicitly simulate them and indicate otherwise). Turn in a write up describing the implementation of the cache system, how different cache configurations affect performance and why. For extra credit you can simulate the impact of write-backs on the performance of the system. Assume that the cost of replacing a dirty line is a 10-cycle startup cost plus 5 cycles per word. Assignment is due May 6th which is the last day of class. Good luck!