In UBC CPSC 313, there is a certain type of question, that is simple to do, but annoying to do it correctly.
Such problem is higher mechanical & repetitive. Therefore, I built a script, that automates the process of solving such problem.
By simply opening the script and sending in your query. It automatically counts number of hits and misses.
- Clone the repository
- Open the repository in any C++ IDE
- Click the run button
- Type in the query in the following form:
- [Cache type] [Access Sequence]
- Press Enter
Input:
LRU B,E,B,B,E,C,D,E,A,A,A,D,B,G,C,D,C,E,C,D
Output:
Number of hits: 11
Number of misses: 9
- LRU
- MRU
- FIFO
- LFU