Skip to content

JuniaAlex/bestfit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors