E-Commerce Platform

CPU Scheduling Optimization – AI Enhanced (Reinforcement Learning & Genetic Algorithms):

Description

AI-Enhanced CPU Scheduler

Role • Systems & AI Engineer  Stack : Python · Pandas · NumPy · GA (DEAP) · Q-learning · Matplotlib · Docker · GitHub Actions


🚀 Professional Impact

Metric Outcome
Latency Up to 35 % reduction in average waiting time vs. baseline SJF on synthetic workloads.
Adaptability Q-learning agent converges to optimal policy within 500 episodes under variable burst-time distributions.
Portability Docker image (< 120 MB) runs identically on Linux, macOS, and Windows WSL without host-specific tweaks.
Reliability GitHub Actions pipeline executes unit tests & GA hyper-param grid (8× configs) in < 3 min, blocking regressions on PR.

 


🔧 Core Technical Highlights

Domain Implementation Details
Traditional Algorithms FCFS, Round Robin, Non-/Pre-emptive Priority, SJF — implemented with common Process interface.
Genetic Algorithms DEAP-based single-objective GA (min wait) & weighted multi-objective GA (wait + turnaround).
Reinforcement Learning Tabular Q-learning; state = ready-queue snapshot, action = next process; ε-greedy decay schedule.
Visualization Matplotlib Gantt charts & seaborn heat-maps for metric comparison; auto-export to /reports/.
Data Logging All runs append CSV rows (run_id, algo, avg_wait, avg_turnaround, CPU_util).
Dockerisation Dockerfile builds slim Python image; invoke docker compose up benchmark.
CI/CD GitHub Actions matrix: Python 3.9↔3.12 + OS; GA/Q-learning smoke tests & flake8 lint.

 


🗂️ Feature Deep-Dive

  • GA Scheduler – Chromosome encodes process order; fitness evaluates average waiting time; elitism + tournament selection.

  • Multi-Objective GA – Weighted sum (α = 0.6 wait, 0.4 turnaround) or Pareto front exploration (NSGA-II prototype).

  • RL Scheduler – Reward = −waiting-time increment; agent learns pre-emptive dispatch decisions on-line.

  • Dashboard Script – Generates HTML report with metric tables, charts, and Docker hash for provenance.


🛠️ Challenges & Solutions

Challenge Solution
GA fitness cost on large queues Multiprocessing eval pool + caching identical chromosomes (≈ 2× speed-up).
Q-learning state-space explosion State hashing (sorted burst tuple, length-capped) trims table by 78 %.
Cross-platform timing variance Simulated clock instead of time.time(); ensures deterministic results in CI.
Dependency drift Pinned requirements + Dependabot alerts; Docker image rebuilt nightly via scheduled CI run.

 


By merging classical OS scheduling with GA and RL optimizers, this project delivers an adaptive, data-driven scheduler that outperforms fixed heuristics—containerised for reproducibility and backed by automated tests for continuous reliability.

Kaynaklar

ChatGPT’ye sor

Technologies Used

Key Features

  • About Developed an advanced CPU scheduling project that integrates classical OS algorithms (e.g., FCFS, Round Robin, Priority, SJF, Preemptive Priority) with AI techniques such as multi-objective Genetic Algorithms and Q-learning