About

This project simulates four different computer hardware caching methods in software, using the LRU strategy to handle evictions. For a trace file with millions of lines, the program can simulate cache performance in under a second on an ubuntu VM.

Source Code

Link to Repository

Available Cache Types

  1. direct-mapped
  2. two-way set-associative
  3. four-way set associative
  4. fully associative

Verbose Output

Direct-Mapped Caching in Verbose Mode

Direct-Mapped Caching in Verbose Mode

Four-Way Set-Associative Caching in Verbose Mode

Four-Way Set-Associative Caching in Verbose Mode

Comparing All Cache Types

Four-Way Set-Associative Caching in Verbose Mode

Four-Way Set-Associative Caching in Verbose Mode