An interactive simulator for learning and comparing CPU scheduling algorithms: SRTF (Shortest Remaining Time First), RRV (Virtual Round Robin), and MLFQ (Multi-Level Feedback Queue). Designed to be visual, simple, and effective for students.
View the live application here.
This project is a web-based simulator for CPU scheduling algorithms. It allows users to input different processes once and compare how different algorithms handle them in real-time on a single screen.
- Single-Screen Comparison: One set of inputs, multiple algorithm results.
- Dummies-First UI: Clean, intuitive interface with zero clutter.
- Advanced Algorithms: Supports SRTF, Virtual Round Robin (RRV), and Multi-Level Feedback Queue (MLFQ).
- Visual Gantt Charts: Interactive charts to see exactly how time is allocated.
- Real-Time Calculation: Change a burst time and see all results update instantly.
- Next.js: Frontend framework for React applications.
- TypeScript: Provides type safety and ensures code robustness.
- Tailwind CSS: Utility-first CSS framework for styling.
- Zod: For form validation schemas.
- React Hook Form: Handles form state and validation.
- Custom Components: Built-in components like
GradientPickerfor user-friendly UI interactions.
To set up the project locally, ensure you have Node.js and Yarn or npm installed.
git clone https://github.com/kautilyadevaraj/SchedulingAlgorithmSimulator
cd scheduling-algorithm-simulatorRun the following command to install the necessary dependencies.
yarn installnpm installNo environment variables are required for this project in its current state. However, if you extend the project with a backend API or database, create a .env.local file in the root directory for environment variables.
Start the development server by running:
yarn devnpm run devThis will start the Next.js development server at http://localhost:3000. You can view the project in your browser by navigating to this address.
If you want to build the project for production, run:
yarn buildnpm run buildThis will create an optimized production build in the .next folder.
- Add Processes: Use the form to add processes with specific arrival times, burst times, and custom background colors.
- Select Algorithm: Choose a scheduling algorithm from the provided options (e.g., SRTF, FCFS).
- Run Simulation: The simulator will display the scheduling results in a real-time animation.
We welcome contributions! To contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b feature-branch-name).
- Make your changes.
- Commit your changes (git commit -m 'Add some feature').
- Push to the branch (git push origin feature-branch-name).
- Open a Pull Request.
For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE file for details.