# dhyanam-mn/sabre-simulator-project-initialization architecture

> Architecture diagram of the GitHub repository dhyanam-mn/sabre-simulator-project-initialization, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dhyanam-mn/sabre-simulator-project-initialization
- Repository: https://github.com/dhyanam-mn/sabre-simulator-project-initialization

## Overview

SABRE is a deterministic discrete-event CPU-scheduling simulator for evaluating adaptive, risk-aware scheduling against benign and adversarial workloads. Its principal workflow generates or loads processes, runs them through a selected scheduler in the simulation engine, then computes performance and security metrics for experiment analysis. The adaptive scheduler combines feature extraction, burst prediction, behavior classification, risk scoring, and elastic containment; baselines support comparisons. The README also describes an interactive dashboard. Some subsystem connections are documented but their implementation was not sampled, so uncertain links are omitted.

Main entry points: [`sabre/experiments/run_experiment.py`](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/run_experiment.py) (Experiment Runner), [`sabre/schedulers/sabre.py`](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/sabre.py) (SABRE Scheduler), [`sabre/core/process.py`](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/process.py) (Process Model), [`sabre/core/engine.py`](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/engine.py) (Event Simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Workload Inputs"]
  node_workload["Benign Workloads<br/>[workload.py]"]
  node_attacks["Attack Workloads<br/>[attacks.py]"]
  node_trace["Trace Loader<br/>[trace_loader.py]"]
end

subgraph group_runtime["Simulation Runtime"]
  node_process["Process Model<br/>[process.py]"]
  node_engine["Event Simulator<br/>[engine.py]"]
  node_scheduler_base["Scheduler Interface<br/>[base.py]"]
  node_baselines["Baseline Schedulers<br/>[baselines.py]"]
end

subgraph group_adaptive["Adaptive Scheduling"]
  node_sabre["SABRE Scheduler<br/>[sabre.py]"]
  node_features["Feature Extraction<br/>[features.py]"]
  node_predictor["Burst Prediction<br/>[predictor.py]"]
  node_classifier["Behavior Classification<br/>[classifier.py]"]
  node_risk["Risk Scoring<br/>[risk.py]"]
  node_controller["Containment Control<br/>[controller.py]"]
  node_calibrate["Risk Calibration<br/>[calibrate.py]"]
end

subgraph group_evaluation["Experiment Analysis"]
  node_metrics["Metrics<br/>[metrics.py]"]
  node_runner["Experiment Runner<br/>[run_experiment.py]"]
  node_stats["Statistical Analysis<br/>[stats.py]"]
  node_plots["Result Plots<br/>[plots.py]"]
  node_tune["Parameter Tuning<br/>[tune.py]"]
  node_dashboard["Analysis Dashboard"]
end

subgraph group_setup["Configuration"]
  node_config["Config Loader<br/>[config.py]"]
  node_default_cfg["Simulator Settings<br/>[default.yaml]"]
end

node_user(("Experimenter"))

node_user -->|"runs experiments"| node_runner
node_runner -->|"loads settings"| node_config
node_config -->|"reads defaults"| node_default_cfg
node_runner -->|"generates workloads"| node_workload
node_runner -->|"creates attacks"| node_attacks
node_runner -->|"loads traces"| node_trace
node_workload -->|"creates processes"| node_process
node_attacks -->|"creates processes"| node_process
node_trace -->|"creates processes"| node_process
node_runner -->|"runs simulations"| node_engine
node_engine -->|"updates state"| node_process
node_engine -->|"dispatches through"| node_scheduler_base
node_baselines -->|"implements interface"| node_scheduler_base
node_sabre -->|"implements interface"| node_scheduler_base
node_sabre -->|"extracts features"| node_features
node_sabre -->|"predicts bursts"| node_predictor
node_sabre -->|"classifies behavior"| node_classifier
node_sabre -->|"scores risk"| node_risk
node_sabre -->|"controls dispatch"| node_controller
node_runner -->|"compares schedulers"| node_baselines
node_runner -->|"evaluates scheduler"| node_sabre
node_runner -->|"computes metrics"| node_metrics
node_runner -->|"summarizes results"| node_stats
node_runner -->|"generates figures"| node_plots
node_tune -->|"loads settings"| node_config
node_calibrate -->|"uses features"| node_features
node_user -.->|"analyzes interactively"| node_dashboard

click node_config "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/config.py"
click node_default_cfg "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/configs/default.yaml"
click node_process "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/process.py"
click node_workload "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/workload.py"
click node_attacks "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/attacks.py"
click node_trace "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/trace_loader.py"
click node_engine "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/engine.py"
click node_scheduler_base "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/base.py"
click node_baselines "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/baselines.py"
click node_sabre "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/sabre.py"
click node_features "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/features.py"
click node_predictor "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/predictor.py"
click node_classifier "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/classifier.py"
click node_risk "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/risk.py"
click node_controller "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/controller.py"
click node_metrics "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/metrics.py"
click node_runner "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/run_experiment.py"
click node_stats "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/stats.py"
click node_plots "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/plots.py"
click node_tune "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/tune.py"
click node_calibrate "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/calibrate.py"
click node_dashboard "https://github.com/dhyanam-mn/sabre-simulator-project-initialization/tree/main/sabre/dashboard"

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_workload,node_attacks,node_trace toneBlue
class node_process,node_engine,node_scheduler_base,node_baselines toneAmber
class node_sabre,node_features,node_predictor,node_classifier,node_risk,node_controller,node_calibrate toneMint
class node_metrics,node_runner,node_stats,node_plots,node_tune,node_dashboard toneRose
class node_config,node_default_cfg,node_user toneIndigo
```

## Components

### Workload Inputs

- [Benign Workloads](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/workload.py): `sabre/core/workload.py`
- [Attack Workloads](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/attacks.py): `sabre/core/attacks.py`
- [Trace Loader](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/trace_loader.py): `sabre/core/trace_loader.py`

### Simulation Runtime

- [Process Model](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/process.py): `sabre/core/process.py`
- [Event Simulator](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/engine.py): `sabre/core/engine.py`
- [Scheduler Interface](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/base.py): `sabre/schedulers/base.py`
- [Baseline Schedulers](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/baselines.py): `sabre/schedulers/baselines.py`

### Adaptive Scheduling

- [SABRE Scheduler](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/sabre.py): `sabre/schedulers/sabre.py`
- [Feature Extraction](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/features.py): `sabre/intel/features.py`
- [Burst Prediction](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/predictor.py): `sabre/intel/predictor.py`
- [Behavior Classification](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/classifier.py): `sabre/intel/classifier.py`
- [Risk Scoring](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/risk.py): `sabre/intel/risk.py`
- [Containment Control](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/schedulers/controller.py): `sabre/schedulers/controller.py`
- [Risk Calibration](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/intel/calibrate.py): `sabre/intel/calibrate.py`

### Experiment Analysis

- [Metrics](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/core/metrics.py): `sabre/core/metrics.py`
- [Experiment Runner](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/run_experiment.py): `sabre/experiments/run_experiment.py`
- [Statistical Analysis](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/stats.py): `sabre/experiments/stats.py`
- [Result Plots](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/plots.py): `sabre/experiments/plots.py`
- [Parameter Tuning](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/experiments/tune.py): `sabre/experiments/tune.py`
- [Analysis Dashboard](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/tree/main/sabre/dashboard): `sabre/dashboard`

### Configuration

- [Config Loader](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/sabre/config.py): `sabre/config.py`
- [Simulator Settings](https://github.com/dhyanam-mn/sabre-simulator-project-initialization/blob/main/configs/default.yaml): `configs/default.yaml`

### Other components

- **Experimenter**

## Connections

- Experimenter → Experiment Runner: runs experiments (evidence: `sabre/experiments/run_experiment.py`)
- Experiment Runner → Config Loader: loads settings (evidence: `sabre/experiments/run_experiment.py`)
- Config Loader → Simulator Settings: reads defaults (evidence: `sabre/config.py`)
- Experiment Runner → Benign Workloads: generates workloads (evidence: `sabre/experiments/run_experiment.py`)
- Experiment Runner → Attack Workloads: creates attacks (evidence: `sabre/experiments/run_experiment.py`)
- Experiment Runner → Trace Loader: loads traces (evidence: `sabre/experiments/run_experiment.py`)
- Benign Workloads → Process Model: creates processes (evidence: `sabre/core/workload.py`)
- Attack Workloads → Process Model: creates processes (evidence: `sabre/core/attacks.py`)
- Trace Loader → Process Model: creates processes (evidence: `sabre/core/trace_loader.py`)
- Experiment Runner → Event Simulator: runs simulations (evidence: `sabre/experiments/run_experiment.py`)
- Event Simulator → Process Model: updates state (evidence: `sabre/core/engine.py`)
- Event Simulator → Scheduler Interface: dispatches through (evidence: `sabre/core/engine.py`)
- Baseline Schedulers → Scheduler Interface: implements interface (evidence: `sabre/schedulers/baselines.py`)
- SABRE Scheduler → Scheduler Interface: implements interface (evidence: `sabre/schedulers/sabre.py`)
- SABRE Scheduler → Feature Extraction: extracts features (evidence: `sabre/schedulers/sabre.py`)
- SABRE Scheduler → Burst Prediction: predicts bursts (evidence: `sabre/schedulers/sabre.py`)
- SABRE Scheduler → Behavior Classification: classifies behavior (evidence: `sabre/schedulers/sabre.py`)
- SABRE Scheduler → Risk Scoring: scores risk (evidence: `sabre/schedulers/sabre.py`)
- SABRE Scheduler → Containment Control: controls dispatch (evidence: `sabre/schedulers/sabre.py`)
- Experiment Runner → Baseline Schedulers: compares schedulers (evidence: `sabre/experiments/run_experiment.py`)
- Experiment Runner → SABRE Scheduler: evaluates scheduler (evidence: `sabre/experiments/run_experiment.py`)
- Experiment Runner → Metrics: computes metrics (evidence: `sabre/experiments/run_experiment.py`)
- Experiment Runner → Statistical Analysis: summarizes results (evidence: `sabre/experiments/run_experiment.py`)
- Experiment Runner → Result Plots: generates figures (evidence: `sabre/experiments/run_experiment.py`)
- Parameter Tuning → Config Loader: loads settings (evidence: `sabre/experiments/tune.py`)
- Risk Calibration → Feature Extraction: uses features (evidence: `sabre/intel/calibrate.py`)
- Experimenter → Analysis Dashboard: analyzes interactively (evidence: `README.md`)
