The OS Scheduling Visualizer is an interactive web application that demonstrates various CPU scheduling algorithms used in operating systems. It provides a visual representation of how different scheduling algorithms handle process execution, making it easier to understand their behavior and performance characteristics.
- Interactive 3D Gantt charts
- Support for multiple scheduling algorithms
- Real-time calculation of performance metrics
- Dynamic process input
- Comparative analysis of different algorithms
- Interactive visualization with rotation and zoom capabilities
-
Frontend Technologies
- HTML5
- JavaScript (ES6+)
- Three.js for 3D visualization
-
Development Tools
- Visual Studio Code (recommended editor)
- Git for version control
- Node.js (optional, for local development server)
os-scheduler-visualizer/
│
├── index.html # Main HTML file
├── readme.md # Readme file
├── img # Icons
└── js/
└── script.js # JavaScript code
-
Arrays and Objects
- Process queue management
- Timeline tracking
- Result storage
-
Priority Queues
- Implementation of SJF and SRTF algorithms
- Process scheduling based on burst time
-
First Come First Serve (FCFS)
- Non-preemptive scheduling
- Processes executed in arrival order
- Time Complexity: O(n log n)
-
Shortest Job First (SJF)
- Non-preemptive scheduling
- Processes executed based on burst time
- Time Complexity: O(n log n)
-
Shortest Remaining Time First (SRTF)
- Preemptive version of SJF
- Continuous monitoring of remaining time
- Time Complexity: O(n log n)
-
Round Robin (RR)
- Time quantum based scheduling
- Fair CPU distribution
- Time Complexity: O(n * total_time/quantum)
-
Clone the Repository
git clone https://github.com/yourusername/os-scheduling-visualizer.git cd os-scheduling-visualizer
-
Using Python's Built-in Server
# If you have Python 3 installed python -m http.server 8000 # If you have Python 2 installed python -m SimpleHTTPServer 8000
Then open http://localhost:8000 in your browser
-
Using Node.js
# Install http-server globally npm install -g http-server # Run the server http-server
Then open http://localhost:8080 in your browser
-
Using VS Code
- Install "Live Server" extension
- Right-click on index.html
- Select "Open with Live Server"
- Browser will open automatically
- Select a scheduling algorithm from the dropdown
- Enter the number of processes
- Input arrival time and burst time for each process
- For Round Robin, specify the time quantum
- Click "Run Selected" to visualize one algorithm
- Click "Run All" to compare all algorithms
- Use mouse to rotate and zoom the Gantt charts
Feel free to fork this repository and submit pull requests. You can also open issues for bugs or feature suggestions.