
Overview
CPU Chronicles is an interactive
, web-based
tool designed to simulate and visualize various CPU scheduling algorithms. It allows users to input custom processes with specific attributes — such as arrival time and burst time — and observe how those processes are scheduled based on the selected algorithm. The primary goal is to provide an educational platform
that aids in understanding the intricacies of CPU scheduling in operating systems.
Key Objectives
- Educational Tool : Facilitate learning by providing a hands-on experience with CPU scheduling algorithms.
- Visualization : Offer real-time visual representations of process scheduling to enhance comprehension.
- User Interaction : Allow users to customize process parameters (
arrival time
,burst time
, etc.) and observe outcomes dynamically.
Supported Scheduling Algorithms
- First Come First Serve (FCFS): Processes are scheduled in the order they arrive.
- Shortest Job First (SJF): Processes with the shortest burst time are scheduled first.
- Round Robin (RR): Each process is assigned a fixed time slot in a cyclic order.
- Shortest Remaining Time First (SRTF): Preemptive version of SJF; the process with the shortest remaining time is scheduled next.
Technologies
Features
- Interactive Process Input: A dynamic form allows users to add or remove processes with real-time validation, making it easy to test different scheduling scenarios quickly.

- Algorithm Selection: Choose between
FCFS
,SJF
,RR
, orSRTF
. Selecting an algorithm instantly updates the simulation, offering quick comparisons.

- Real-Time Visualization: The Gantt chart updates live as you add or remove processes, with color-coded bars for easy interpretation. Works seamlessly on all screen sizes.

- Performance Metrics: Calculates
average waiting time
,turnaround time
, andresponse time
. Results are compared across algorithms to identify performance trade-offs.

Development and Challenges
The development of the CPU Chronicles involved several phases, each presenting unique challenges:
- Algorithm Implementation: Complex logic handling for SRTF preemption, real-time time progression, and accurate state synchronization.
- User Interface Design: Dynamic forms for process input, responsive Gantt chart layout, and dark/light theme toggling.
- State Management: Synchronizing global state (
process list
,selected algorithm
) across components using Context API. - Performance Optimization: Debouncing inputs and minimizing re-renders to ensure smooth visualization even with many processes.
- Accessibility and UX: Keyboard navigation for forms, screen-reader friendly labels, and seamless theme transitions.
Conclusion
The CPU Chronicles serves as a valuable educational tool, bridging the gap between theoretical concepts and practical understanding of CPU scheduling algorithms. By providing an interactive platform with real-time visualization and performance metrics, it enhances the learning experience for students and enthusiasts in the field of operating systems.