This project implements a virtual memory manager in C, as part of the exercises presented in Operating System Concepts, Silberschatz, A. et al, 10th edition.
The virtual memory manager simulates the translation of logical addresses to physical addresses using page tables and TLB (Translation Lookaside Buffer). It supports two page replacement algorithms: FIFO (First-In-First-Out) and LRU (Least Recently Used). The TLB uses FIFO for page translations.
- Virtual memory translation from logical addresses to physical addresses.
- Page replacement algorithms: FIFO and LRU.
- TLB management using FIFO.
- The frames in physical memory are filled from 0 to 127.
-
Clone the repository:
git clone https://github.com/Sofia-Saraiva/virtual-memory-manager.git
-
Navigate to the project directory:
cd virtual-memory-manager/src
-
Compile the code using Makefile:
make vm
-
Execute the program with command-line arguments:
./vm address.txt lru
Replace
address.txt
with the path to your input file containing logical addresses, andlru
with eitherfifo
orlru
to select the page replacement algorithm.
The program will generate an output file named correct.txt
containing the translated physical addresses and other statistics, following the provided format for validation.
- GCC 13.2.0 or higher
- Linux operating system
This project was developed for the Infrastructure of Software course in the third semester at Cesar School.