A detailed simulation of how RAM and secondary storage interact, focusing on page replacement algorithms, memory management techniques, and swapping mechanisms.
- 🔄 Page Replacement Algorithms: Implements FIFO, LRU, and other strategies to manage memory allocation between RAM and secondary storage.
- 📊 RAM and Storage Simulation: Models the dynamic interaction between RAM and secondary storage, including page faults, swapping, and more.
- 📈 Statistics Tracking: Monitors page fault rates, hit/miss ratios, memory utilization, and provides detailed reports.
- 🛠 Swapping Mechanism: Simulates the swapping of memory pages between RAM and disk storage, optimizing memory usage.
- ⚙️ Modular Design: Well-organized and extensible codebase, with clear separation of concerns between different components like paging, swapping, and statistical analysis.
- Programming Language:
C
- Environment: Linux-based development and testing.
- Build System: Makefile for easy compilation and execution.
- Page Replacement Algorithms:
page_fault.c: Manages detection and handling of page faults.page_replacement.c: Implements various page replacement strategies like FIFO and LRU.
- Paging and Memory Management:
paging.c&paging.h: Core modules for simulating paging, handling memory allocation, and managing page tables.
- Swapping Mechanism:
swap.c,swap.h,swapops.c,swapops.h: Implements the swapping mechanism that manages the movement of pages between RAM and secondary storage.
- Statistics Module:
stats.c&stats.h: Tracks and reports on key performance metrics, including page faults, hit/miss ratios, and memory usage.
- Simulation Control:
pagesim.c&pagesim.h: Main driver integrating all components to simulate the interaction between RAM and secondary storage.
- Utilities:
util.c: Contains utility functions used across different modules.types.h: Defines common data types and structures used throughout the project.
- GCC Compiler (or any C compiler)
- Linux environment (for development and testing)
- Clone the repository:
git clone https://github.com/yourusername/RAM-Storage-Simulation.git
<-- VirtualMemory-Model --> Programmed a virtual memory Model in C++