High-performance CPU scheduling algorithms with C++ optimization
Project description
OS Simulator
A high-performance Python package implementing CPU scheduling algorithms with C++ optimization.
Features
- First Come First Served (FCFS): Simple queue-based scheduling
- Shortest Job First (SJF): Optimal average waiting time scheduling
- Round Robin (RR): Time-slice based preemptive scheduling
- C++ Performance: Optimized implementations using pybind11
- Easy Integration: Simple Python interface for complex algorithms
Installation
pip install os-simulator
Quick Start
from os_simulator import os_algorithms
# Define processes
processes = [
{"pid": 1, "arrival_time": 0, "burst_time": 5},
{"pid": 2, "arrival_time": 1, "burst_time": 3},
{"pid": 3, "arrival_time": 2, "burst_time": 8},
]
# Run FCFS scheduling
scheduled = os_algorithms.fcfs_scheduler(processes)
# Run SJF scheduling
scheduled = os_algorithms.sjf_scheduler(processes)
# Run Round Robin with time quantum of 2
scheduled = os_algorithms.round_robin_scheduler(processes, 2)
Algorithm Details
FCFS (First Come First Served)
Processes are scheduled in order of arrival time. Simple but can cause convoy effect.
SJF (Shortest Job First)
Schedules shortest burst time processes first. Optimal for average waiting time.
Round Robin
Each process gets a fixed time quantum. Fair scheduling with controlled response time.
Development
git clone https://github.com/Will-Swinson/os-simulator
cd os-simulator
pip install -e .
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file os_simulator-0.2.1.tar.gz.
File metadata
- Download URL: os_simulator-0.2.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0addf29f00254014e87709ce66db6a2cf9a733b01e10fb22b6fd9b670df7f463
|
|
| MD5 |
98d80e016c0652ae6d07e38738379725
|
|
| BLAKE2b-256 |
b49eefb0f5875adbc9ed81cf284f4616c8ab0be41de99027008203971d678940
|
File details
Details for the file os_simulator-0.2.1-cp314-cp314-macosx_15_0_arm64.whl.
File metadata
- Download URL: os_simulator-0.2.1-cp314-cp314-macosx_15_0_arm64.whl
- Upload date:
- Size: 80.2 kB
- Tags: CPython 3.14, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c6c393e0082058be2548a6707fb1f8b29866fb13ee065f68a8c774bc0a7529a
|
|
| MD5 |
942ec1bc9fe6c8141acea30a3d6a3a40
|
|
| BLAKE2b-256 |
bfb06de0c1f4c0772612f929c379e45cb7ff90318408e2d3e836dea76221e2be
|