A project focused on simulating cache memory behavior and implementing an LRU (Least Recently Used) stack for efficient cache management.
- π¦ Cache Simulation: Models the behavior of a CPU cache, allowing detailed analysis of cache hits, misses, and overall performance.
- π LRU Stack Implementation: Manages cache entries using the LRU (Least Recently Used) replacement policy.
- π§ͺ Unit Testing: Includes unit tests to verify the correctness and performance of the cache simulation and LRU stack.
- βοΈ Modular Design: Separates concerns between cache simulation, LRU stack management, and testing, enabling easy extension and maintenance.
- Programming Language:
C
- Environment: Linux-based development and testing.
- Build System: Makefile for easy compilation and execution.
- Cache Simulation:
cachesim.c&cachesim.h: Core modules for simulating cache behavior, including cache access patterns, hit/miss tracking, and overall performance metrics.cachesim: Binary executable for running the cache simulation.cachetest: Test suite for verifying the functionality of the cache simulation.
- LRU Stack Implementation:
lrustack.c&lrustack.h: Implements the LRU (Least Recently Used) stack mechanism for cache management.lrustacktest.c: Contains unit tests to ensure the LRU stack operates correctly.lrustacktest: Binary executable for running the LRU stack tests.
- Testing:
cachetest: Executable for testing the cache simulation.lrustacktest: Executable for testing the LRU stack implementation.
- GCC Compiler (or any C compiler)
- Linux environment (for development and testing)
- Clone the repository:
git clone https://github.com/yourusername/Cache-LRU-Simulation.git
Made a cache sim model in VScode using C++ as a coding language