# crazypegasusvv/taskscheduling architecture

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

- Interactive diagram: https://gitdiagram.com/crazypegasusvv/taskscheduling
- Repository: https://github.com/crazypegasusvv/taskscheduling

## Overview

TaskScheduling is a small script that generates random workflow DAGs, assigns tasks to cloud VMs, schedules eligible tasks, and prints completion and makespan information. The main workflow is implemented in scheduler.py; config.py supplies randomized settings, shared task state, and the Task model. The excerpts show these stages and their calls; no separate cloud service or persistent store is evidenced.

Main entry points: [`config.py`](https://github.com/crazypegasusvv/taskscheduling/blob/master/config.py) (Settings and state), [`scheduler.py`](https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py) (Workflow initialization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Scheduling workflow"]
  node_dag["DAG generation<br/>[scheduler.py]"]
  node_initialize["Workflow initialization<br/>[scheduler.py]"]
  node_assign["VM assignment<br/>[scheduler.py]"]
  node_schedule["Schedule coordinator<br/>[scheduler.py]"]
  node_cloud["Cloud scheduling<br/>[scheduler.py]"]
  node_report["Task results<br/>[scheduler.py]"]
end

subgraph group_state["Configuration and state"]
  node_config["Settings and state<br/>[config.py]"]
  node_task["Task model<br/>[config.py]"]
end

node_initialize -->|"generates DAGs"| node_dag
node_initialize -->|"creates tasks"| node_task
node_initialize -->|"updates arrivals"| node_config
node_assign -->|"sets burst times"| node_task
node_assign -->|"reads settings"| node_config
node_schedule -->|"dispatches VM"| node_cloud
node_cloud -->|"updates task state"| node_task
node_cloud -->|"checks arrivals and policy"| node_config
node_report -->|"reads task results"| node_task
node_config -->|"defines"| node_task
node_initialize -->|"uses shared state"| node_config

click node_dag "https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py"
click node_initialize "https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py"
click node_assign "https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py"
click node_schedule "https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py"
click node_cloud "https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py"
click node_report "https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py"
click node_config "https://github.com/crazypegasusvv/taskscheduling/blob/master/config.py"
click node_task "https://github.com/crazypegasusvv/taskscheduling/blob/master/config.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_dag,node_initialize,node_assign,node_schedule,node_cloud,node_report toneBlue
class node_config,node_task toneAmber
```

## Components

### Scheduling workflow

- [DAG generation](https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py): `scheduler.py`
- [Workflow initialization](https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py): `scheduler.py`
- [VM assignment](https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py): `scheduler.py`
- [Schedule coordinator](https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py): `scheduler.py`
- [Cloud scheduling](https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py): `scheduler.py`
- [Task results](https://github.com/crazypegasusvv/taskscheduling/blob/master/scheduler.py): `scheduler.py`

### Configuration and state

- [Settings and state](https://github.com/crazypegasusvv/taskscheduling/blob/master/config.py): `config.py`
- [Task model](https://github.com/crazypegasusvv/taskscheduling/blob/master/config.py): `config.py`

## Connections

- Workflow initialization → DAG generation: generates DAGs (evidence: `scheduler.py`)
- Workflow initialization → Task model: creates tasks (evidence: `scheduler.py`)
- Workflow initialization → Settings and state: updates arrivals (evidence: `scheduler.py`)
- VM assignment → Task model: sets burst times (evidence: `scheduler.py`)
- VM assignment → Settings and state: reads settings (evidence: `scheduler.py`)
- Schedule coordinator → Cloud scheduling: dispatches VM (evidence: `scheduler.py`)
- Cloud scheduling → Task model: updates task state (evidence: `scheduler.py`)
- Cloud scheduling → Settings and state: checks arrivals and policy (evidence: `scheduler.py`)
- Task results → Task model: reads task results (evidence: `scheduler.py`)
- Settings and state → Task model: defines (evidence: `config.py`)
- Workflow initialization → Settings and state: uses shared state (evidence: `scheduler.py`)
