Skip to content

YerraguntaAjayKumar/DeadlockSimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeadlockSimulator

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.

Features

  • 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

Repository Structure

  • app.py - Streamlit application entry point
  • utils.py - Helper functions for input parsing and subprocess management
  • requirements.txt - Python dependencies
  • cpp/ - C++ source files and compile script
  • executables/ - compiled binaries generated by cpp/compile.sh

Prerequisites

  • Python 3.8 or later
  • pip
  • g++ or a compatible C++ compiler
  • Streamlit (pip install streamlit)

Installation

pip install -r requirements.txt

Compile C++ Modules

bash cpp/compile.sh

Run the App

streamlit run app.py

Then open http://localhost:8501 in your browser.

Notes

  • The executables/ folder contains compiled binaries for the C++ algorithms.
  • cpp/compile.sh compiles all C++ source files and places the executables in executables/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors