Skip to content

A simple Python project that simulates process allocation in memory using different strategies (First Fit, Best Fit, Worst Fit). It allows users to input process sizes and block sizes, then shows how memory is allocated.

reyistired/Memory-Allocation-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory Allocation Visualizer

A beautiful web-based application that simulates OS memory management using First Fit and Best Fit algorithms.

Features

  • 🎨 Modern, responsive UI
  • 📊 Visual representation of memory allocation
  • 💾 First Fit and Best Fit algorithms
  • 📈 Internal fragmentation calculation
  • 📱 Mobile-friendly design

Installation

  1. Install dependencies:
pip install -r requirements.txt

Running the Application

  1. Start the Flask server:
python app.py
  1. Open your browser and navigate to:
http://localhost:5000

Usage

  1. Select an algorithm (First Fit or Best Fit)
  2. Enter memory partition sizes (space-separated integers in KB)
    • Example: 900 910 300 250
  3. Enter process sizes (space-separated integers in KB)
    • Example: 275 690 155 750
  4. Click "Run Allocation" to see the results

Algorithms

First Fit

Allocates each process to the first available partition that is large enough.

Best Fit

Allocates each process to the smallest available partition that can accommodate it, minimizing wasted space.

Output

The results page displays:

  • Job overview with sizes
  • Memory block allocation details
  • Status (Allocated/Not Allocated)
  • Internal fragmentation for each block
  • Total statistics (memory used, available, internal fragmentation)

Project Structure

Memory Allocation Visualizer/
├── app.py                  # Flask application
├── requirements.txt        # Python dependencies
├── templates/
│   ├── index.html         # Input page
│   └── result.html        # Results page
└── MAV.py                 # Console version (legacy)

Technologies Used

  • Backend: Python Flask
  • Frontend: HTML5, CSS3 (vanilla, no frameworks)
  • Algorithms: First Fit, Best Fit memory allocation

Contributors

  • Group Number: [Group XX]
  • Members:
    • Member 1 Name
    • Member 2 Name
    • Member 3 Name
  • Section: [Section Name]

Made with ❤️ for Operating Systems class

About

A simple Python project that simulates process allocation in memory using different strategies (First Fit, Best Fit, Worst Fit). It allows users to input process sizes and block sizes, then shows how memory is allocated.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published