Write a cache simulator. Write your program in C or C++ and call it cache.c (for C) or cache.cc (for C++). The program should work by the following specifications:
r 56ecd8 r 47f639 r 7ff0001ff w 47f63e r 4817ef r 7d5ab8
gzip -dc 429.mcf-184B.trace.txt.gz | ./cache 2048 64 64 l 55752 5.575200% 55703 5.610155% 49 0.689752%That is, we decompress the mcf trace, pipe it through the program specifying a 2048 kilobyte cache with 64-way associativity and 64 bytes per block with LRU replacement, and we get a 5.5752% total miss rate. Although there are many ways to implement LRU, they will all result in exactly the same answer so if you get this answer, too, then you are on the right track.
Write this code yourself. Do not receive assistance from anyone except for your professor.
Late assignments will not be accepted.