JuniaAlex/bestfit
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
ย | ย | |||
ย | ย | |||
ย | ย | |||
ย | ย | |||
Repository files navigation
๐ง Memory Management Simulator โ Best Fit Allocation
A modern, interactive Web-based Memory Management Simulator that demonstrates how processes are allocated in memory using the Best Fit algorithm under:
Fixed Partitioning
Variable Partitioning
This project is designed to help students understand core Operating System concepts through real-time visualization.
๐ Features
๐ฏ Best Fit Memory Allocation
๐งฉ Supports:
Fixed Partitioning
Variable Partitioning
๐ Real-time Memory Visualization
๐ Process Table Tracking
๐ Fragmentation Analysis:
Internal Fragmentation
External Fragmentation
๐ Reset & Next Process Simulation
๐จ Modern UI with animations and particle background
๐ฅ๏ธ Project Structure
๐ project-folder
โโโ index.html # Main UI structure :contentReference[oaicite:0]{index=0}
โโโ style.css # Styling and UI design :contentReference[oaicite:1]{index=1}
โโโ app.js # Core logic & simulation :contentReference[oaicite:2]{index=2}
โ๏ธ How It Works
Enter:
Process ID
Process Size
Memory Block Sizes (minimum 4 blocks)
Select Partition Type:
Fixed
Variable
Click Allocate Memory
The simulator:
Finds the best-fit block
Allocates memory
Updates visualization
Shows fragmentation
๐งฎ Best Fit Algorithm
The Best Fit strategy selects the smallest available memory block that can accommodate the process.
Logic:
Traverse all free blocks
Choose block with minimum leftover space
Allocate process to that block
๐ Fragmentation Handling
๐น Fixed Partitioning
Shows Internal Fragmentation
Unused memory inside allocated block is tracked
๐น Variable Partitioning
Shows External Fragmentation
Free blocks may exist but not usable due to size mismatch
๐ ๏ธ Technologies Used
HTML5
CSS3 (Modern UI + Animations)
Vanilla JavaScript (ES6)
โถ๏ธ How to Run
Download or clone the repository:
git clone https://github.com/your-username/memory-management-simulator.git
Open the project folder
Run:
open index.html
or simply double-click index.html
๐ธ Preview
Interactive memory blocks
Allocation logs
Fragmentation summary
Process tracking table
๐ฏ Learning Outcomes
This simulator helps you understand:
Memory Allocation Strategies
Best Fit Algorithm
Internal vs External Fragmentation
OS Memory Management Concepts
๐ Future Enhancements
Add First Fit & Worst Fit algorithms
Process deallocation
Dynamic memory compaction
Step-by-step animation mode
๐จโ๐ป Author
Junia Alex
โญ Support
If you like this project, give it a โญ on GitHub!