A JavaScript simulation of hardware cache with k-way associativity and LRU replacement strategy
The User inputs the cache description as well as the cache.
This page then uses JavaScript to Simulate the application of an LRU Cache.
For each memory access in the input, the page will print a ‘C’ if it is served by the cache, and print ‘M’ if it is served by the memory.
The first line of the input is used to describe the cache. Using the Example A
32 1024 64 4
409
658
915
1172
661
1429
1168
403
925
1172
MMMM
CMCM
MC
Load of the actual index.html for more detailed instructions.