Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔒 Deadlock Lab

An interactive web-based simulator to visualize and understand deadlocks in operating systems using Resource Allocation Graphs (RAG).


🚀 Features

  • 🎯 Create Processes and Resources dynamically
  • 🔗 Add Request (P → R) and Allocation (R → P) edges
  • 🔍 Detect deadlocks using cycle detection
  • 🔴 Highlight deadlock cycles visually
  • 📖 Clear step-by-step explanation of deadlock conditions
  • 🔁 Undo / Redo support
  • ❌ Add / Delete nodes and edges
  • 🔤 Case-insensitive input handling
  • 🎬 Animated cycle highlighting
  • 📘 Built-in learning page for deadlock concepts

🧠 Concept Covered

This simulator demonstrates:

  • Resource Allocation Graph (RAG)
  • Circular Wait Condition
  • Deadlock Detection
  • Difference between Cycle vs Deadlock
  • Process-Resource interaction

🛠️ Tech Stack

  • HTML
  • CSS
  • JavaScript
  • vis-network (for graph visualization)

🌐 Live Demo

👉 (Add your GitHub Pages link here)


📸 How It Works

  1. Add Processes and Resources
  2. Create edges:
    • Request → Process → Resource
    • Allocation → Resource → Process
  3. Click Check Deadlock
  4. View:
    • 🔴 Highlighted cycle
    • 📖 Explanation

⚠️ Important Rules

  • Deadlock requires at least two processes
  • Not every cycle is a deadlock
  • Self-loop is NOT deadlock

📚 Learning Page

Click "Learn Deadlock" inside the app to understand:

  • Definition
  • Conditions
  • Examples
  • Graph representation

🎯 Purpose

This project is designed as an educational tool to help students visualize and understand how deadlocks form in operating systems, rather than just learning theory.


🏆 Status

✔️ Fully functional
✔️ Conceptually accurate
✔️ Interactive & visual


🤝 Contributing

Feel free to fork and improve the project.


📄 License

Open for educational use.

About

Interactive Deadlock Simulator using Resource Allocation Graphs with real-time visualization, cycle detection, and step-by-step explanation of circular wait conditions.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages