Skip to content

Operating-System-Modelling/Primary-Memory-Model-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Cache Simulation and LRU Stack Project

C Language Operating Systems Cache Simulation

A project focused on simulating cache memory behavior and implementing an LRU (Least Recently Used) stack for efficient cache management.


🌟 Features

  • πŸ“¦ 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.

πŸ›  Tech Stack

  • Programming Language: C
  • Environment: Linux-based development and testing.
  • Build System: Makefile for easy compilation and execution.

πŸ—‚ Project Structure

  1. 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.
  2. 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.
  3. Testing:
    • cachetest: Executable for testing the cache simulation.
    • lrustacktest: Executable for testing the LRU stack implementation.

πŸš€ Getting Started

Prerequisites

  • GCC Compiler (or any C compiler)
  • Linux environment (for development and testing)

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/Cache-LRU-Simulation.git
    

Cachsim-Model-(ECE3058 Project 3)

Made a cache sim model in VScode using C++ as a coding language

About

Made a cache sim model in VScode using C++ as a coding language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published