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.