A Python-based simulator that implements core Operating System CPU Scheduling Algorithms.
This project demonstrates practical understanding of process scheduling, ready queues, preemption, and performance metrics using clean and modular code design.
- Implements major CPU Scheduling Algorithms:
- First Come First Serve (FCFS)
- Round Robin (RR)
- Shortest Job First (SJF)
- Shortest Remaining Time First (SRTF)
- Priority Scheduling
- Preemptive Priority Scheduling
- Accurate simulation of OS-level process execution
- Efficient ready queue management using appropriate data structures
- Calculation of key scheduling metrics:
- Completion Time
- Turnaround Time
- Waiting Time
- Modular and extensible project structure
- Easy to add new algorithms or enhancements
- Operating Systems (CPU Scheduling)
- Process Management
- Preemption & Time Quantum
- Ready Queue Simulation
- Data Structures (
deque, lists) - Algorithmic Time Complexity
- Clean Code & Modular Design
python-os/
βββ algorithms/
β βββ fcfs.py
β βββ round_robin.py
β βββ sjf.py
β βββ srtf.py
β βββ priority.py
β βββ preemptive_priority.py
β βββ __init__.py
β
βββ core/
β βββ process.py
β βββ __init__.py
β
βββ main.py
βββ README.md
- Language: Python
- Core CS: Operating Systems, Data Structures & Algorithms
- Tools: Git, GitHub
- Clone the repository:
git clone <your-repo-link>
2.Navigate to the project directory:
cd python-os3.Run the main file:
python main.pyπ Output
The simulator outputs:
Execution order of processes
Completion Time
Turnaround Time
Waiting Time
This helps in visualizing and comparing scheduling algorithms.
π Learning Outcome
This project strengthened my understanding of Operating System internals, particularly how CPU scheduling works in real systems, while applying DSA concepts in Python.