A beginner-friendly simulator for operating system deadlock concepts. This project includes a Python Streamlit UI and C++ modules for Banker's Algorithm, deadlock detection, and graph cycle detection.
- Banker's Algorithm for safe state checking and safe sequence generation
- Deadlock detection via Resource Allocation Graph (RAG)
- Directed graph cycle detection using depth-first search
- Streamlit-based UI for interactive simulation
- C++ modules compiled to executables for core algorithm logic
app.py- Streamlit application entry pointutils.py- Helper functions for input parsing and subprocess managementrequirements.txt- Python dependenciescpp/- C++ source files and compile scriptexecutables/- compiled binaries generated bycpp/compile.sh
- Python 3.8 or later
- pip
- g++ or a compatible C++ compiler
- Streamlit (
pip install streamlit)
pip install -r requirements.txtbash cpp/compile.shstreamlit run app.pyThen open http://localhost:8501 in your browser.
- The
executables/folder contains compiled binaries for the C++ algorithms. cpp/compile.shcompiles all C++ source files and places the executables inexecutables/.