An interactive web application for visualizing and comparing CPU scheduling algorithms. Built for students and educators studying operating systems concepts.
- FCFS — First Come First Serve (non-preemptive)
- SJF — Shortest Job First (non-preemptive)
- SRTF — Shortest Remaining Time First (preemptive)
- Round Robin — with configurable time quantum
- Priority (Non-preemptive) — lower number = higher priority
- Priority (Preemptive) — preemptive priority scheduling
- Play, Pause, Resume, and Step-by-step execution
- Speed control: 1x, 2x, 5x, 10x
- Animated ready queue with queue movement
- Real-time CPU execution panel with progress bar
- Dynamic Gantt chart built during simulation
- Per-process statistics: Completion, Turnaround, Waiting, Response time
- Aggregate metrics: Throughput, CPU Utilization
- Algorithm comparison page with Recharts bar charts
- Modern dashboard layout with dark mode
- Responsive design for desktop and mobile
- Algorithm information panel with descriptions, pros/cons, complexity
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| Vite 8 | Build tool & dev server |
| Tailwind CSS 4 | Styling |
| Recharts | Comparison charts |
| React Router | Navigation |
| Lucide React | Icons |
- Node.js 18+ (recommended: 20+)
- npm 9+
# Clone or navigate to the project directory
cd Process_Scheduler_Visualizer
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
npm run build
npm run previewProcess_Scheduler_Visualizer/
├── public/
│ └── favicon.svg
├── src/
│ ├── algorithms/ # Scheduling algorithm implementations
│ │ ├── base.js # Shared utilities
│ │ ├── fcfs.js
│ │ ├── sjf.js
│ │ ├── srtf.js
│ │ ├── roundRobin.js
│ │ ├── priorityNonPreemptive.js
│ │ ├── priorityPreemptive.js
│ │ └── index.js # Algorithm registry
│ ├── components/
│ │ ├── common/ # Button, Card, ProgressBar
│ │ ├── charts/ # GanttChart, ComparisonCharts
│ │ ├── input/ # ProcessInputPanel
│ │ ├── info/ # AlgorithmInfo
│ │ ├── layout/ # Header, Layout
│ │ ├── simulation/ # Controls, ReadyQueue, CPU panel
│ │ └── stats/ # StatisticsDashboard
│ ├── context/
│ │ └── SchedulerContext.jsx
│ ├── data/
│ │ ├── algorithmInfo.js
│ │ └── sampleData.js
│ ├── hooks/
│ │ ├── useDarkMode.js
│ │ └── useSimulation.js
│ ├── pages/
│ │ ├── SimulatorPage.jsx
│ │ └── ComparisonPage.jsx
│ ├── utils/
│ │ ├── colors.js
│ │ ├── statistics.js
│ │ └── validation.js
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── index.html
├── vite.config.js
├── package.json
└── README.md
Enter process details in the input panel:
- PID — Process identifier (e.g., P1, P2)
- Arrival Time — When the process arrives (≥ 0)
- Burst Time — CPU time required (> 0)
- Priority — Lower number = higher priority
Use Load Sample for pre-built datasets or Add Process for custom entries.
- Select a scheduling algorithm from the dropdown
- Set time quantum (for Round Robin)
- Click Run to compute and auto-play, or Play to animate step-by-step
- Use Pause, Resume, Step, and speed controls during playback
Navigate to the Compare page to see bar charts comparing all six algorithms on the current process set.
Toggle dark mode using the sun/moon icon in the header. Preference is saved to localStorage.
| Dataset | Processes | Description |
|---|---|---|
| Basic | 4 | Standard 4-process set |
| Mixed Arrivals | 5 | Staggered arrival times |
| Priority Test | 4 | Priority-focused scenario |
| Round Robin Demo | 4 | Ideal for RR visualization |
Lower priority number = higher priority (e.g., priority 1 beats priority 3).
MIT