Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iboud0/memory-managment

Simple memory management system
https://github.com/iboud0/memory-managment

Last synced: 7 days ago
JSON representation

Simple memory management system

Awesome Lists containing this project

README

        

---

# Memory Management System

This project implements a simple memory management system in Python. It simulates memory allocation and deallocation strategies commonly used in operating systems.

## Table of Contents

1. [Introduction](#introduction)
2. [Project Structure](#project-structure)
3. [Installation](#installation)
4. [Usage](#usage)
5. [Memory Allocation Strategies](#memory-allocation-strategies)
6. [Contributing](#contributing)

## Introduction

The Memory Management System project provides a simulation of memory management techniques used in operating systems. It allows users to create and delete processes, allocate memory for processes, free memory, and convert virtual addresses to physical addresses.

## Project Structure

The project is organized as follows:

- `mmu/`: Contains the source code for the memory management unit.
- `models/`: Contains the definition of MemoryBlock and Process classes.
- `strategy/`: Contains different memory allocation strategy implementations.
- `main.py`: Main script to run the memory management simulation.
- `README.md`: Documentation file providing information about the project.

## Installation

To use the Memory Management System, follow these steps:

1. Clone the repository to your local machine:

```bash
git clone https://github.com/your-username/memory-management-system.git
```

2. Navigate to the project directory:

```bash
cd memory-management-system
```

3. Install the required dependencies:

```bash
pip install -r requirements.txt
```

## Usage

To run the memory management simulation, execute the `main.py` script:

```bash
python main.py
```

Follow the on-screen instructions to interact with the memory management system.

## Memory Allocation Strategies

The project implements the following memory allocation strategies:

- **First Fit**: Allocates the first available memory block that is large enough to accommodate the process.
- **Best Fit**: Allocates the smallest available memory block that is large enough to accommodate the process.
- **Next Fit**: Similar to First Fit, but starts searching for available memory from the last allocation position.
- **Worst Fit**: Allocates the largest available memory block, which may lead to fragmentation but is useful for certain scenarios.

## Contributing

Contributions to the project are welcome! Feel free to submit bug reports, feature requests, or pull requests.

---