Release Notes - CPU Scheduling Library v1.0.0
Overview
Initial release (v1.0.0) of the CPU Scheduling Library, featuring FCFS with plans for SJF, SRTF, and RR.
The older code had several issues:
- Incorrect completion times (CTs) due to naive CT calculation and flawed halt handling.
- Limited halt detection (detected only one halt, even if multiple halts exist)
- Negative waiting times.
- Inefficient data structures (two mappings, redundant sorting).
- Risk of data leaks (global dictionaries not cleared).
- Lack of type safety and clear documentation.
The new code addresses these by:
- Computing CTs correctly with integrated halt detection.
- Detecting all halts.
- Ensuring non-negative waiting times.
- Using a single, efficient mapping.
- Adding type annotations and detailed docstrings.
- Preventing data leaks with proper dictionary management.
Dependencies
prettytable
(install viapip install prettytable
).
Usage
prcs = ["P1", "P2", "P3", "P4", "P5", "P6"]
at = [4, 19, 2, 3, 2, 2]
bt = [1, 2, 7, 1, 2, 2]
s1 = CpuSheduling(prcs, at, bt)
s1.fcfs()
Future Plans
- Add SJF, SRTF, and RR algorithms.
- Improve input validation and performance.
Release Date: April 17, 2025