Skip to content

Pruthvirajsinh7/Memory-Allocation-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Memory Allocation Algorithm

This repository contains a Python program for visualizing various memory allocation algorithms, including First Fit, Best Fit, Worst Fit, and Next Fit.

Contents

Folder Structure

  • images: This folder contains images used in the README file.
  • main.py: The main Python script for running the memory allocation algorithm GUI.
  • MemAlloExamples.txt: Examples of memory allocation scenarios for First Fit, Best Fit, Worst Fit, and Next Fit algorithms.

Running the Program

  1. Clone the repository to your local machine:

    git clone https://github.com/Pruthvirajsinh7/Memory-Allocation-Algorithm.git
  2. Navigate to the repository directory:

    cd Memory-Allocation-Algorithm
  3. Run the main.py script:

    python main.py
  4. When prompted, enter the total memory size in kilobytes.

  5. Enter partition sizes separated by commas when prompted.

  6. The GUI will display the total memory with partitions. You can enter process sizes and choose the allocation algorithm from the menu.

Examples

Check the MemAlloExamples.txt file for detailed examples of memory allocation scenarios. The examples cover First Fit, Best Fit, Worst Fit, and Next Fit algorithms.

Screenshots

1. Enter Total Memory Size (in KB):

Total Memory Size

2. Enter Partition Sizes (separated by commas):

Partition Sizes

3. Memory GUI with Partition:

Memory GUI

4. First Fit Example:

First Fit Example

5. Best Fit Example:

Best Fit Example

6. Worst Fit Example:

Worst Fit Example

7. Next Fit Example:

First Fit Example

Feel free to explore and experiment with different scenarios to understand how each memory allocation algorithm behaves.

Releases

No releases published

Packages

No packages published

Languages