A console-based Mini Operating System Simulator written in C (C99) that demonstrates core CPU scheduling algorithms. This project computes essential scheduling metrics and visualizes execution using text-based Gantt charts, making it ideal for academic learning, OS labs, and portfolio showcases.
Understanding CPU scheduling is fundamental to Operating Systems, but theory alone isn't enough. MiniOS Scheduler bridges that gap by allowing users to interactively simulate scheduling algorithms, observe execution order, and analyze performance metrics in real time.
- First Come First Serve (FCFS)
- Shortest Job First (SJF – Non-Preemptive)
- Round Robin (RR) with configurable time quantum
- User-defined Process ID
- Arrival Time
- Burst Time
- Time Quantum (for Round Robin)
- Completion Time (CT)
- Turnaround Time (TAT)
- Waiting Time (WT)
- Average Waiting Time
- Average Turnaround Time
- Text-based Gantt Chart for each scheduling run
- Clearly shows CPU allocation over time
- Clean separation of scheduling logic
- Reusable utilities for sorting, printing, and statistics
- Easy to extend with new algorithms
- Language Standard: C99 (
-std=c99) - Libraries Used: Standard C libraries only (
stdio.h,stdlib.h,string.h) - Maximum Processes: Configurable (
MAX_PROCESSES = 100by default) - Time Units: Integer-based simulation
- Round Robin: Time quantum must be a positive integer
- Invalid menu choices
- Negative arrival times
- Zero or negative burst times
pid– Process IDarrival_time– Arrival timeburst_time– Original CPU burstremaining_time– Used by Round Robinstart_time– First execution timecompletion_time– Finish timeturnaround_time– CT − ATwaiting_time– TAT − BTfinished– Boolean flag
pid– Process IDstart– Start timeend– End time
Used to render the Gantt chart.
MiniOS_Scheduler/
├── main.c // Menu-driven program and input handling
├── scheduler.h // Shared structs and function declarations
├── fcfs.c // FCFS scheduling implementation
├── sjf.c // SJF (non-preemptive) implementation
├── round_robin.c // Round Robin scheduling with queue logic
├── utils.c // Utilities: sorting, tables, Gantt, averages
├── utils.h // Utility function declarations
└── README.md // Project documentation
gcc -std=c99 -Wall -Wextra main.c fcfs.c sjf.c round_robin.c utils.c -o MiniOS_Scheduler./MiniOS_SchedulerFollow the interactive menu to:
- Enter process details
- Choose a scheduling algorithm
- View computed metrics and Gantt chart
- Enter 3 processes with different arrival and burst times
- Run FCFS to view:
- Process table
- Waiting & turnaround times
- Gantt chart
- Run Round Robin with a small time quantum to:
- Observe time-sliced execution
- Compare metrics with FCFS and SJF
- Small process sets with known expected averages
- CPU idle periods
- Same arrival times
- Same burst times
- Very large vs very small time quantum
- Preemptive SJF (SRTF)
- Priority Scheduling
- File-based input/output
- Colored Gantt charts
- Performance comparison summary across algorithms
This project is released under the MIT License.
Feel free to use, modify, and distribute with attribution.
Ankesh Kumar – Computer Science Student | Systems & Java Enthusiast
Built to strengthen OS fundamentals and demonstrate clean, modular C programming suitable for academic and resume use.
- 🌐 GitHub: @AnkeshGG
- 💼 LinkedIn: Ankesh Kumar
- 📝 Medium: @ankeshGG
- Operating Systems Concepts – For theoretical foundation
- C Programming Community – For best practices and guidance
- Open Source Contributors – Who make learning accessible
🟢 Actively maintained
- Version: 1.0.0
- Last Updated: January 2026
- Stars: ⭐ Give this project a star if you found it helpful!
© 2026 Ankesh Kumar.
Learning by building – one algorithm at a time.