This project is a C++ simulator that shows how a CPU scheduler runs tasks and how memory blocks move through different cache levels in real time.
- Task Scheduler: Controls which task gets CPU time next.
- 3-Level Cache Hierarchy: Simulates L1, L2, and L3 memory storage to make memory hits, misses, and evictions visible.
- Terminal Display: Prints out the exact state of the cache levels at every single cycle.
- Scheduling: I used the Round Robin algorithm with a time quantum of 3. This means each task gets a fair turn of up to 3 cycles before moving to the back of the line so other tasks can run.
- Cache Memory: I built a 3-level cache setup (L1, L2, L3) followed by RAM. When a task requests a memory block, it searches from L1 down to RAM.
- Eviction: If a cache level is completely full and needs to store a new block, it uses the FIFO (First-In, First-Out) rule, which means the oldest memory block in that queue gets kicked out.