arya2004 / arya2004/beginner-python-mini-projects-hacktoberfest-2025
🚀 Feature Request: Add CPU Scheduling Algorithms Simulator
- Dominant language
- Jupyter Notebook
- Stars
- 25
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
---
Suggest a new feature or enhancement for the CPU Scheduling Algorithms Simulator project
---
## 🚀 Feature Request: CPU Scheduling Algorithms Simulator
### 📘 Description
Implement a **CPU Scheduling Algorithms Simulator** using **Streamlit** to visualize and compare different CPU scheduling strategies interactively.
This feature will allow users to simulate various scheduling algorithms, understand their working principles, and analyze performance metrics through visual aids.
---
### 🎯 Feature Details
#### **Algorithms to Implement**
| Algorithm | Description | Key Characteristics |
|------------|--------------|----------------------|
| **FCFS (First Come First Serve)** | Processes are executed in the order they arrive. | Non-preemptive, simple queue-based scheduling. |
| **SJF (Shortest Job First)** | The process with the smallest burst time executes first. | Can be preemptive or non-preemptive, minimizes waiting time. |
| **Round Robin (RR)** | Each process gets an equal time quantum cyclically. | Preemptive, fair time-sharing among processes. |
| **Priority Scheduling** | Processes are scheduled based on priority values. | Can be preemptive or non-preemptive, potential starvation issue. |
---
### 🧠 Planned Features
- **Process Generator**
- Dynamically add or generate processes with:
- Process ID
- Arrival Time
- Burst Time
- Priority (for Priority Scheduling)
- **Algorithm Explanation Section**
- Show theoretical explanation when user clicks on an algorithm.
- Include formulae for waiting time and turnaround time.
- Provide a small example walkthrough.
- **Scheduler Visualization**
- Interactive **Gantt Chart** visualization using Streamlit Charts or Plotly.
- Step-by-step simulation control.
- **Performance Analyzer**
- Display metrics:
- Average Waiting Time
- Average Turnaround Time
- CPU Utilization
- Throughput
- **Comparison Dashboard**
- Compare results of all algorithms in a table or chart.
---
### 🖥️ UI/UX Ideas
| Component | Functionality |
|------------|----------------|
| **Sidebar** | Select algorithm, input process data, or generate random processes |
| **Main Panel** | Display visualization, tables, and metrics |
| **Tabs** | Separate sections for “Simulation”, “Comparison”, and “Learn” |
| **Buttons** | Run Simulation, Reset, Export Results (CSV/JSON) |
---
### 🧩 Technical Details
| Aspect | Tool / Technology |
|--------|--------------------|
| **Frontend** | Streamlit (Python) |
| **Visualization** | Plotly / Matplotlib |
| **Data Handling** | Pandas |
| **Language** | Python 3.x |
---
### ✅ Expected Outcome
- Interactive simulator to help understand CPU scheduling algorithms visually.
- Side-by-side performance comparison for better learning.
- Educational tool suitable for students, educators, and researchers.
---
### 🧑💻 Additional Notes
**Future Enhancements:**
- Add I/O burst simulation.
- Include Multilevel Queue and Multilevel Feedback Queue algorithms.
- Export simulation reports as **PDF** or **CSV**.
Contributor guide
Assessment
This issue has not been assessed yet.