Skip to content

Latest commit

 

History

History
106 lines (76 loc) · 2.29 KB

File metadata and controls

106 lines (76 loc) · 2.29 KB

Python OS Scheduler Simulator

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.


📌 Features

  • 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

🧠 Concepts Covered

  • Operating Systems (CPU Scheduling)
  • Process Management
  • Preemption & Time Quantum
  • Ready Queue Simulation
  • Data Structures (deque, lists)
  • Algorithmic Time Complexity
  • Clean Code & Modular Design

📂 Project Structure

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

⚙️ Technologies Used

  • Language: Python
  • Core CS: Operating Systems, Data Structures & Algorithms
  • Tools: Git, GitHub

🚀 How to Run

  1. Clone the repository:
    git clone <your-repo-link>

2.Navigate to the project directory:

   cd python-os

3.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.