2Q algorithm
solves LRU caching problems by introducing parallel buffers and supporting queues. Instead of considering just recency as a factor, 2Q also considers access frequency while making the decision to ensure the page that is really warm gets a place in the LRU cache. It admits only hot pages to the main buffer and tests every page for a second reference.
mkdir build-debug
cmake -B build-debug/ -DCMAKE_BUILD_TYPE=Debug
cmake --build build-debug/
# Build in release preset
cd build/
make
# Navigate to build directory and run
cd build/
ctest