MVT - Memory Management Simulation

Muhammad Anas Farooq

Prototyper
Java

MVT - Memory Management Simulation

This project simulates the "Multiple Partitions - Variable Regions" (MVT) memory management technique using Java.

Project Description

The simulation manages a memory of size 2 GB (2048 MB), with 512 MB allocated for the operating system (OS). Processes are read from two text files, ready.txt and job.txt, representing the ready queue and the job queue, respectively. Each line in these files contains:
Process number
Process size
Time in memory
Processes from the ready queue are allocated to memory in the order given in the file. When a job finishes execution, a new job is brought from the job queue using the First-Come, First-Served (FCFS) scheduling algorithm with skipping. The job is fit into the memory based on the variable partitioning technique named as First Fit.

Features

Memory Allocation: First fit algorithm is used for memory allocation.
Compaction: Memory compaction is performed when the number of holes exceeds three.
Graphical Representation: The program displays detailed diagrams of memory contents, showing allocated partitions, free holes, and the contents of the ready and job queues at each step.
Process Execution: The simulation shows which job finishes execution and which job is brought into memory to replace it.
Memory State Before and After Compaction: Diagrams show memory partitions before and after compaction.

Usage

Requirements

Java Development Kit (JDK)
JavaFX or Swing for the user interface

Running the Program

Ensure you have the required Java environment set up.
Place the ready.txt and job.txt files in the src/files directory.
Compile and run the program.

Files

ready.txt: Contains the initial processes in the ready queue.
job.txt: Contains the processes in the job queue.
Each line in these files should have the following format:

Example

Demo

MVT_DEMO.mp4
Partner With Muhammad Anas
View Services

More Projects by Muhammad Anas