# jopeswubn/talyeros---a-scenario-driven-mini-os-simulator architecture

> Architecture diagram of the GitHub repository jopeswubn/talyeros---a-scenario-driven-mini-os-simulator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator
- Repository: https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator

## Overview

TalyerOS is a browser-based CPU scheduling simulator with an OS/car-repair-shop presentation. Users configure a workload and scheduling rule, then step or play the simulation and inspect process state, kernel events, timelines, and metrics; they can also compare algorithms. The README documents additional PCB/TCB inspection, child-workload cloning, and lock-based deadlock demonstration and recovery. Those capabilities are included, though their detailed UI wiring is not shown in the excerpts; edges reflect only shown calls or documented relationships.

Main entry points: [`js/kernel.js`](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/kernel.js) (Simulation kernel), [`js/ui.js`](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js) (Playback and controls), [`index.html`](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/index.html) (Simulator page), [`js/story.js`](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/story.js) (OS and shop story)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Interface and presentation"]
  node_page["Simulator page<br/>[index.html]"]
  node_controls["Playback and controls<br/>[ui.js]"]
  node_story["OS and shop story<br/>[story.js]"]
end

subgraph group_workload["Workload and process model"]
  node_generator["Workload generator<br/>[ui.js]"]
  node_spec["Process specifications<br/>[process.js]"]
  node_pcb["Process and thread model<br/>[process.js]"]
end

subgraph group_scheduling["Scheduling and simulation"]
  node_kernel["Simulation kernel<br/>[kernel.js]"]
  node_fcfs["FCFS strategy<br/>[fcfs.js]"]
  node_sjf["SJF strategy<br/>[sjf.js]"]
  node_rr["Round Robin strategy<br/>[rr.js]"]
  node_priority["Priority strategy<br/>[priority.js]"]
end

subgraph group_inspection["Inspection and analysis"]
  node_inspector["PCB / TCB inspector<br/>[ui.js]"]
  node_deadlock["Deadlock demo<br/>[kernel.js]"]
  node_timeline["Timeline and event log<br/>[ui.js]"]
  node_metrics["Metrics and comparison<br/>[ui.js]"]
end

node_user(("Simulator user"))

node_user -->|"opens"| node_page
node_page -->|"loads interface"| node_controls
node_user -->|"configures and plays"| node_controls
node_controls -->|"constructs and advances"| node_kernel
node_controls -->|"uses translations"| node_story
node_user -->|"sets workload"| node_generator
node_generator -.->|"creates workload"| node_spec
node_kernel -->|"creates control blocks"| node_pcb
node_kernel -->|"selects process"| node_fcfs
node_kernel -->|"selects process"| node_sjf
node_kernel -->|"selects process"| node_rr
node_kernel -->|"selects process"| node_priority
node_controls -.->|"presents details"| node_inspector
node_user -->|"inspects process"| node_inspector
node_user -->|"loads and resolves demo"| node_deadlock
node_controls -->|"renders simulation"| node_timeline
node_kernel -->|"provides timeline and log"| node_timeline
node_controls -->|"computes comparisons"| node_metrics
node_kernel -->|"provides statistics"| node_metrics

click node_page "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/index.html"
click node_controls "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js"
click node_story "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/story.js"
click node_generator "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js"
click node_spec "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/process.js"
click node_pcb "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/process.js"
click node_kernel "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/kernel.js"
click node_fcfs "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/algorithms/fcfs.js"
click node_sjf "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/algorithms/sjf.js"
click node_rr "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/algorithms/rr.js"
click node_priority "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/algorithms/priority.js"
click node_inspector "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js"
click node_deadlock "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/kernel.js"
click node_timeline "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js"
click node_metrics "https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.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_controls,node_story,node_user toneBlue
class node_generator,node_spec,node_pcb toneAmber
class node_kernel,node_fcfs,node_sjf,node_rr,node_priority toneMint
class node_inspector,node_deadlock,node_timeline,node_metrics toneRose
```

## Components

### Interface and presentation

- [Simulator page](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/index.html): `index.html`
- [Playback and controls](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js): `js/ui.js`
- [OS and shop story](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/story.js): `js/story.js`

### Workload and process model

- [Workload generator](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js): `js/ui.js`
- [Process specifications](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/process.js): `js/process.js`
- [Process and thread model](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/process.js): `js/process.js`

### Scheduling and simulation

- [Simulation kernel](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/kernel.js): `js/kernel.js`
- [FCFS strategy](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/algorithms/fcfs.js): `js/algorithms/fcfs.js`
- [SJF strategy](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/algorithms/sjf.js): `js/algorithms/sjf.js`
- [Round Robin strategy](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/algorithms/rr.js): `js/algorithms/rr.js`
- [Priority strategy](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/algorithms/priority.js): `js/algorithms/priority.js`

### Inspection and analysis

- [PCB / TCB inspector](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js): `js/ui.js`
- [Deadlock demo](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/kernel.js): `js/kernel.js`
- [Timeline and event log](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js): `js/ui.js`
- [Metrics and comparison](https://github.com/jopeswubn/talyeros---a-scenario-driven-mini-os-simulator/blob/main/js/ui.js): `js/ui.js`

### Other components

- **Simulator user**

## Connections

- Simulator user → Simulator page: opens (evidence: `README.md`)
- Simulator page → Playback and controls: loads interface (evidence: `README.md`)
- Simulator user → Playback and controls: configures and plays (evidence: `README.md`)
- Playback and controls → Simulation kernel: constructs and advances (evidence: `js/ui.js`)
- Playback and controls → OS and shop story: uses translations (evidence: `js/ui.js`)
- Simulator user → Workload generator: sets workload (evidence: `README.md`)
- Workload generator → Process specifications: creates workload
- Simulation kernel → Process and thread model: creates control blocks (evidence: `js/kernel.js`)
- Simulation kernel → FCFS strategy: selects process (evidence: `js/kernel.js`)
- Simulation kernel → SJF strategy: selects process (evidence: `js/kernel.js`)
- Simulation kernel → Round Robin strategy: selects process (evidence: `js/kernel.js`)
- Simulation kernel → Priority strategy: selects process (evidence: `js/kernel.js`)
- Playback and controls → PCB / TCB inspector: presents details (evidence: `js/ui.js`)
- Simulator user → PCB / TCB inspector: inspects process (evidence: `README.md`)
- Simulator user → Deadlock demo: loads and resolves demo (evidence: `README.md`)
- Playback and controls → Timeline and event log: renders simulation (evidence: `js/ui.js`)
- Simulation kernel → Timeline and event log: provides timeline and log (evidence: `js/kernel.js`)
- Playback and controls → Metrics and comparison: computes comparisons (evidence: `js/ui.js`)
- Simulation kernel → Metrics and comparison: provides statistics (evidence: `js/kernel.js`)
