Skip to content

Repository files navigation

English ·  Spanish


Memory Manager Simulator

Memory Manager Simulator

A visual simulator for contiguous memory partition management algorithms.

Java 21 JavaFX 21 Maven Version License

Warning

Single maintainer, UNMAINTAINED PROJECT: This project started as a personal need and has grown into an open-source one. It's maintained in my spare time. If the tool has been useful to you, consider contributing to help improve it and expand its features.

Understand how contiguous memory allocation algorithms make their decisions — without memorizing pseudocode. Load a configuration file, pick an algorithm, and step through the simulation at your own pace with full control over every micro-operation.


Preview

Dark mode Light mode

Watch the full walkthrough video


Target Audience

This tool will be particularly useful if you fall into one of these groups:

  • Students taking an Operating Systems course
  • University faculty — a great tool for visualizing contiguous allocation algorithms without drawing on a whiteboard
  • Lab exercises or similar academic work

If you're a student, it'll help you visually understand the differences between algorithms and how each one works under the hood. If you're a teacher, you can put the whiteboard sketches aside and use a professional simulation tailored to your explanations and examples.

Features

  • 4 contiguous allocation algorithms: Best Fit, Worst Fit, First Fit, Next Fit
  • Tick & Step granularity: Inspect every micro-operation within each CPU cycle
  • Visual memory map: Real-time block view with usage stats and fragmentation metrics
  • Process table: Per-process turnaround, waiting, and response time tracking
  • Configuration file driven: Plain-text format with optional initial memory state
  • Dark / Light theme
  • Dynamic playback speed: Change the playback speed at any time and pick whatever works best for you.

See the full roadmap.


Configuration File

Simulations are generated from a configuration file. It's plain text and ridiculously easy to set up.

The minimum configuration to run a simulation is:

[config]
SIZE, 512     // total memory in KB
UNIT, 64      // minimum allocation unit

[process]
P1, 0, 128, 3     // ID  ArrivalTick  MemoryKB  BurstTicks

An optional [initial] section defines a pre-existing memory state at tick 0:

[initial]
100               // free hole (100 KB)
Proceso1, 200     // occupied block
Proceso2, 200

Lines starting with // are treated as comments and ignored. Inline comments after any field are also supported.

Accepted separators: , (comma) or space. Full format specification and a ready-to-use template here.


How to Use

  1. Generate a scenario using a configuration file.
  2. Load it with the Open File button.
  3. Select an algorithm and playback speed.
  4. Click Start.
  5. Navigate the simulation with the Next/Prev buttons to step through micro-operations and Forward/Rewind to jump between full ticks.
  6. Use the Details, Process Table, and other views to understand what's happening at each point.
  7. [COMING SOON] Export the scenario as a video or image to present or include in your work.

Building and Running from Source

If you're a developer and want to run it yourself, read this section first.

Requirements

  • Java 21+
  • Maven 3.8+

JavaFX and all other dependencies are resolved automatically via Maven.

Build & Run

# Compile and run
mvn clean javafx:run

# Package as portable app (jlink + jpackage)
mvn clean package
# Output: target/release/MemoryManagerSimulator/

Related content

In anyone wants to see how things were done under the hood, check out these guides detailing the process.


Third-Party Libraries & Plugins

Library Purpose
JavaFX 21 UI framework
AtlantaFX Modern theme and styling
Ikonli (Feather) Icon pack
Gson JSON config parsing
JUnit 5 Testing framework

Maven plugins: javafx-maven-plugin for jlink runtime images, jpackage-maven-plugin for native packaging.


Contributing

This project is in its early stages and every contribution counts — whether it's a bug fix, a new feature, or just improving the docs. If something feels off while using it, that's already reason enough to open a PR.

Check out CONTRIBUTING.md to get started. Pull requests are always welcome.

About

A visual simulator for contiguous memory partition management algorithms, with a special focus on educational purposes

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages