# sohail342/os_project architecture

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

- Interactive diagram: https://gitdiagram.com/sohail342/os_project
- Repository: https://github.com/sohail342/os_project

## Overview

This is a browser-based CPU scheduling teaching simulator. Users manage process inputs, choose FCFS, SJF, priority, or Round Robin, and view execution order and completion-time results. The sampled JavaScript shows process-row editing, scheduling calculations, result-table construction, and animation helpers; the README supplies the broader feature list. The excerpts do not establish all event-handler connections, so the graph keeps those relationships at the documented workflow level.

Main entry points: [`scheduling_algos.js`](https://github.com/sohail342/os_project/blob/master/scheduling_algos.js) (Algorithm scheduling), [`index.html`](https://github.com/sohail342/os_project/blob/master/index.html) (Simulator page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Simulator interface"]
  node_page["Simulator page<br/>[index.html]"]
  node_processes["Process inputs"]
  node_results["Execution results"]
end

subgraph group_runtime["Scheduling runtime"]
  node_scheduler["Algorithm scheduling"]
  node_animation["Timeline animation"]
end

node_user(("Learner"))

node_user -->|"uses"| node_page
node_user -->|"edits processes"| node_processes
node_processes -->|"provides inputs"| node_scheduler
node_user -->|"chooses algorithm"| node_scheduler
node_scheduler -->|"shows order and time"| node_results
node_results -.->|"animates execution"| node_animation

click node_page "https://github.com/sohail342/os_project/blob/master/index.html"
click node_processes "https://github.com/sohail342/os_project/blob/master/scheduling_algos.js"
click node_scheduler "https://github.com/sohail342/os_project/blob/master/scheduling_algos.js"
click node_results "https://github.com/sohail342/os_project/blob/master/scheduling_algos.js"
click node_animation "https://github.com/sohail342/os_project/blob/master/scheduling_algos.js"

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_page,node_processes,node_results toneBlue
class node_scheduler,node_animation toneAmber
class node_user toneIndigo
```

## Components

### Simulator interface

- [Simulator page](https://github.com/sohail342/os_project/blob/master/index.html): `index.html`
- [Process inputs](https://github.com/sohail342/os_project/blob/master/scheduling_algos.js): `scheduling_algos.js`
- [Execution results](https://github.com/sohail342/os_project/blob/master/scheduling_algos.js): `scheduling_algos.js`

### Scheduling runtime

- [Algorithm scheduling](https://github.com/sohail342/os_project/blob/master/scheduling_algos.js): `scheduling_algos.js`
- [Timeline animation](https://github.com/sohail342/os_project/blob/master/scheduling_algos.js): `scheduling_algos.js`

### Other components

- **Learner**

## Connections

- Learner → Simulator page: uses (evidence: `README.md`)
- Learner → Process inputs: edits processes (evidence: `README.md`)
- Process inputs → Algorithm scheduling: provides inputs (evidence: `README.md`)
- Learner → Algorithm scheduling: chooses algorithm (evidence: `README.md`)
- Algorithm scheduling → Execution results: shows order and time (evidence: `README.md`)
- Execution results → Timeline animation: animates execution (evidence: `scheduling_algos.js`)
