# ajaykumaronly/ai-driven-process-management-system- architecture

> Architecture diagram of the GitHub repository ajaykumaronly/ai-driven-process-management-system-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ajaykumaronly/ai-driven-process-management-system-
- Repository: https://github.com/ajaykumaronly/ai-driven-process-management-system-

## Overview

This repository is an AI-assisted CPU scheduling simulator. Its visible web workflow is user input in the Flask-rendered UI, POST to the scheduling endpoint, burst-time prediction, selection of FCFS/SJF or RL scheduling, and JSON results for display. The RL module provides the main internal layer: a process environment with a ready queue, policy actions, and scheduling metrics. The README also describes Round Robin, priority scheduling, and richer visualizations, but the sampled runtime code does not establish their implementation or wiring; the graph therefore focuses on evidenced capabilities.

Main entry points: [`ai_scheduler_project/app.py`](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/app.py) (Flask app), [`ai_scheduler_project/scheduler/rl_scheduler.py`](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/scheduler/rl_scheduler.py) (RL scheduler runner), [`ai_scheduler_project/models/ml_burst.py`](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/models/ml_burst.py) (Burst predictor), [`ai_scheduler_project/templates/index.html`](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/templates/index.html) (Scheduling UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_ui["Scheduling UI<br/>[index.html]"]
  node_style["UI styling<br/>[style.css]"]
end

subgraph group_api["Request handling"]
  node_flask["Flask app<br/>[app.py]"]
  node_basic["FCFS / SJF<br/>[app.py]"]
  node_traditional["Traditional schedulers<br/>[traditional.py]"]
  node_results["Schedule and metrics<br/>[app.py]"]
end

subgraph group_prediction["Burst prediction"]
  node_predict["Burst predictor<br/>[ml_burst.py]"]
  node_training_data["Process dataset<br/>[process_data.csv]"]
  node_ml_artifacts["ML model and scaler"]
end

subgraph group_rl["RL scheduling"]
  node_rl_entry["RL scheduler runner<br/>[rl_scheduler.py]"]
  node_environment["Process environment<br/>[rl_scheduler.py]"]
  node_ppo["PPO policy"]
end

node_user(("User"))

node_user -->|"enters processes"| node_ui
node_ui -->|"submits schedule"| node_flask
node_flask -->|"renders page"| node_ui
node_flask -->|"predicts bursts"| node_predict
node_predict -->|"loads model"| node_ml_artifacts
node_predict -->|"trains from"| node_training_data
node_flask -->|"runs FCFS/SJF"| node_basic
node_flask -->|"dispatches RL"| node_rl_entry
node_rl_entry -->|"steps environment"| node_environment
node_rl_entry -->|"loads policy"| node_ppo
node_rl_entry -->|"returns metrics"| node_results
node_basic -->|"returns schedule"| node_results

click node_ui "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/templates/index.html"
click node_style "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/static/style.css"
click node_flask "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/app.py"
click node_basic "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/app.py"
click node_traditional "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/scheduler/traditional.py"
click node_predict "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/models/ml_burst.py"
click node_training_data "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/data/process_data.csv"
click node_ml_artifacts "https://github.com/ajaykumaronly/ai-driven-process-management-system-/tree/main/ai_scheduler_project/models"
click node_rl_entry "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/scheduler/rl_scheduler.py"
click node_environment "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/scheduler/rl_scheduler.py"
click node_ppo "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/models/rl_scheduler_model.zip"
click node_results "https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ui,node_style,node_user toneBlue
class node_flask,node_basic,node_traditional,node_results toneAmber
class node_predict,node_training_data,node_ml_artifacts toneMint
class node_rl_entry,node_environment,node_ppo toneRose
```

## Components

### Web interface

- [Scheduling UI](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/templates/index.html): `ai_scheduler_project/templates/index.html`
- [UI styling](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/static/style.css): `ai_scheduler_project/static/style.css`

### Request handling

- [Flask app](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/app.py): `ai_scheduler_project/app.py`
- [FCFS / SJF](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/app.py): `ai_scheduler_project/app.py`
- [Traditional schedulers](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/scheduler/traditional.py): `ai_scheduler_project/scheduler/traditional.py`
- [Schedule and metrics](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/app.py): `ai_scheduler_project/app.py`

### Burst prediction

- [Burst predictor](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/models/ml_burst.py): `ai_scheduler_project/models/ml_burst.py`
- [Process dataset](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/data/process_data.csv): `ai_scheduler_project/data/process_data.csv`
- [ML model and scaler](https://github.com/ajaykumaronly/ai-driven-process-management-system-/tree/main/ai_scheduler_project/models): `ai_scheduler_project/models`

### RL scheduling

- [RL scheduler runner](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/scheduler/rl_scheduler.py): `ai_scheduler_project/scheduler/rl_scheduler.py`
- [Process environment](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/scheduler/rl_scheduler.py): `ai_scheduler_project/scheduler/rl_scheduler.py`
- [PPO policy](https://github.com/ajaykumaronly/ai-driven-process-management-system-/blob/main/ai_scheduler_project/models/rl_scheduler_model.zip): `ai_scheduler_project/models/rl_scheduler_model.zip`

### Other components

- **User**

## Connections

- User → Scheduling UI: enters processes (evidence: `README.md`)
- Scheduling UI → Flask app: submits schedule (evidence: `README.md`)
- Flask app → Scheduling UI: renders page (evidence: `ai_scheduler_project/app.py`)
- Flask app → Burst predictor: predicts bursts (evidence: `ai_scheduler_project/app.py`)
- Burst predictor → ML model and scaler: loads model (evidence: `ai_scheduler_project/models/ml_burst.py`)
- Burst predictor → Process dataset: trains from (evidence: `ai_scheduler_project/models/ml_burst.py`)
- Flask app → FCFS / SJF: runs FCFS/SJF (evidence: `ai_scheduler_project/app.py`)
- Flask app → RL scheduler runner: dispatches RL (evidence: `ai_scheduler_project/app.py`)
- RL scheduler runner → Process environment: steps environment (evidence: `ai_scheduler_project/scheduler/rl_scheduler.py`)
- RL scheduler runner → PPO policy: loads policy (evidence: `ai_scheduler_project/scheduler/rl_scheduler.py`)
- RL scheduler runner → Schedule and metrics: returns metrics (evidence: `ai_scheduler_project/scheduler/rl_scheduler.py`)
- FCFS / SJF → Schedule and metrics: returns schedule (evidence: `ai_scheduler_project/app.py`)
