# nate318/simulador-so architecture

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

- Interactive diagram: https://gitdiagram.com/nate318/simulador-so
- Repository: https://github.com/nate318/simulador-so

## Overview

SimuladorSO is an educational WPF operating-system simulator. Users configure and run a kernel simulation, inject or observe processes, inspect CPU, memory, I/O, and metrics, and can launch separate scheduling or memory-allocation benchmarks. The graph preserves the documented process, scheduling, memory, interrupt/I/O, metrics, and benchmarking stages. Source excerpts confirm key engine, UI, benchmark, MMU, and metrics relationships; unsampled wiring is omitted where it cannot be established.

Main entry points: [`SimuladorSO/Engine/SimulationEngine.cs`](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Engine/SimulationEngine.cs) (Simulation engine), [`MainWindow.xaml.cs`](https://github.com/nate318/simulador-so/blob/master/MainWindow.xaml.cs) (Simulation UI), [`SimuladorSO/Memory/MMU.cs`](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/MMU.cs) (MMU and paging), [`SimuladorSO/Benchmarking/BenchmarkEngine.cs`](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/BenchmarkEngine.cs) (Scheduling benchmark)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_window["Simulation UI<br/>[MainWindow.xaml.cs]"]
end

subgraph group_kernel["Kernel simulation"]
  node_engine["Simulation engine"]
  node_process["Process PCB<br/>[Process.cs]"]
  node_interrupts["Interrupt queue<br/>[Interrupt.cs]"]
  node_interrupttypes["Interrupt types<br/>[InterruptType.cs]"]
  node_states["Process states<br/>[ProcessState.cs]"]
  node_cpu["CPU hardware<br/>[CPU.cs]"]
  node_scheduler["Scheduler base<br/>[Scheduler.cs]"]
  node_policies["Scheduling policies"]
end

subgraph group_memory["Memory management"]
  node_mmu["MMU and paging<br/>[MMU.cs]"]
  node_frames[("Physical frames<br/>[Frame.cs]")]
  node_pageentry["Page entries<br/>[PageEntry.cs]"]
  node_tlbentry["TLB entries<br/>[TLBEntry.cs]"]
end

subgraph group_benchmarks["Benchmarks"]
  node_schedbench["Scheduling benchmark<br/>[BenchmarkEngine.cs]"]
  node_schedresults["Scheduling results<br/>[BenchmarkResult.cs]"]
  node_membench["Memory benchmark"]
  node_memresults["Memory results"]
end

subgraph group_reporting["Metrics and results"]
  node_metrics["Simulation metrics"]
end

node_user(("User"))

node_user -->|"operates"| node_window
node_window -->|"controls and displays"| node_engine
node_window -->|"launches"| node_schedbench
node_window -->|"launches"| node_membench
node_engine -->|"manages"| node_process
node_engine -->|"queues"| node_interrupts
node_engine -->|"updates"| node_metrics
node_engine -->|"selects"| node_scheduler
node_engine -->|"uses"| node_cpu
node_scheduler -->|"queues"| node_process
node_policies -.->|"implement"| node_scheduler
node_interrupts -->|"classifies"| node_interrupttypes
node_engine -.->|"manages memory with"| node_mmu
node_mmu -->|"allocates"| node_frames
node_mmu -->|"tracks pages with"| node_pageentry
node_mmu -->|"caches translations with"| node_tlbentry
node_schedbench -->|"runs scenarios on"| node_engine
node_schedbench -->|"produces"| node_schedresults
node_membench -->|"runs scenarios on"| node_engine
node_membench -->|"produces"| node_memresults

click node_window "https://github.com/nate318/simulador-so/blob/master/MainWindow.xaml.cs"
click node_engine "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Engine/SimulationEngine.cs"
click node_process "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Kernel/Processes/Process.cs"
click node_interrupts "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Kernel/Interrupts/Interrupt.cs"
click node_interrupttypes "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Kernel/Enums/InterruptType.cs"
click node_states "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Kernel/Enums/ProcessState.cs"
click node_cpu "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Hardware/CPU.cs"
click node_scheduler "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Scheduling/Scheduler.cs"
click node_policies "https://github.com/nate318/simulador-so/tree/master/SimuladorSO/Scheduling"
click node_mmu "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/MMU.cs"
click node_frames "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/Frame.cs"
click node_pageentry "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/PageEntry.cs"
click node_tlbentry "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/TLBEntry.cs"
click node_metrics "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Metrics/SimulationMetrics.cs"
click node_schedbench "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/BenchmarkEngine.cs"
click node_schedresults "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/BenchmarkResult.cs"
click node_membench "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/MemoryBenchmarkEngine.cs"
click node_memresults "https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/MemoryBenchmarkResult.cs"

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_window,node_user toneBlue
class node_engine,node_process,node_interrupts,node_interrupttypes,node_states,node_cpu,node_scheduler,node_policies toneAmber
class node_mmu,node_frames,node_pageentry,node_tlbentry toneMint
class node_schedbench,node_schedresults,node_membench,node_memresults toneRose
class node_metrics toneIndigo
```

## Components

### User interface

- [Simulation UI](https://github.com/nate318/simulador-so/blob/master/MainWindow.xaml.cs): `MainWindow.xaml.cs`

### Kernel simulation

- [Simulation engine](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Engine/SimulationEngine.cs): `SimuladorSO/Engine/SimulationEngine.cs`
- [Process PCB](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Kernel/Processes/Process.cs): `SimuladorSO/Kernel/Processes/Process.cs`
- [Interrupt queue](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Kernel/Interrupts/Interrupt.cs): `SimuladorSO/Kernel/Interrupts/Interrupt.cs`
- [Interrupt types](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Kernel/Enums/InterruptType.cs): `SimuladorSO/Kernel/Enums/InterruptType.cs`
- [Process states](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Kernel/Enums/ProcessState.cs): `SimuladorSO/Kernel/Enums/ProcessState.cs`
- [CPU hardware](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Hardware/CPU.cs): `SimuladorSO/Hardware/CPU.cs`
- [Scheduler base](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Scheduling/Scheduler.cs): `SimuladorSO/Scheduling/Scheduler.cs`
- [Scheduling policies](https://github.com/nate318/simulador-so/tree/master/SimuladorSO/Scheduling): `SimuladorSO/Scheduling`

### Memory management

- [MMU and paging](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/MMU.cs): `SimuladorSO/Memory/MMU.cs`
- [Physical frames](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/Frame.cs): `SimuladorSO/Memory/Frame.cs`
- [Page entries](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/PageEntry.cs): `SimuladorSO/Memory/PageEntry.cs`
- [TLB entries](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Memory/TLBEntry.cs): `SimuladorSO/Memory/TLBEntry.cs`

### Benchmarks

- [Scheduling benchmark](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/BenchmarkEngine.cs): `SimuladorSO/Benchmarking/BenchmarkEngine.cs`
- [Scheduling results](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/BenchmarkResult.cs): `SimuladorSO/Benchmarking/BenchmarkResult.cs`
- [Memory benchmark](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/MemoryBenchmarkEngine.cs): `SimuladorSO/Benchmarking/MemoryBenchmarkEngine.cs`
- [Memory results](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Benchmarking/MemoryBenchmarkResult.cs): `SimuladorSO/Benchmarking/MemoryBenchmarkResult.cs`

### Metrics and results

- [Simulation metrics](https://github.com/nate318/simulador-so/blob/master/SimuladorSO/Metrics/SimulationMetrics.cs): `SimuladorSO/Metrics/SimulationMetrics.cs`

### Other components

- **User**

## Connections

- User → Simulation UI: operates (evidence: `README.md`)
- Simulation UI → Simulation engine: controls and displays (evidence: `MainWindow.xaml.cs`)
- Simulation UI → Scheduling benchmark: launches (evidence: `MainWindow.xaml.cs`)
- Simulation UI → Memory benchmark: launches (evidence: `MainWindow.xaml.cs`)
- Simulation engine → Process PCB: manages (evidence: `SimuladorSO/Engine/SimulationEngine.cs`)
- Simulation engine → Interrupt queue: queues (evidence: `SimuladorSO/Engine/SimulationEngine.cs`)
- Simulation engine → Simulation metrics: updates (evidence: `SimuladorSO/Engine/SimulationEngine.cs`)
- Simulation engine → Scheduler base: selects (evidence: `SimuladorSO/Engine/SimulationEngine.cs`)
- Simulation engine → CPU hardware: uses (evidence: `SimuladorSO/Engine/SimulationEngine.cs`)
- Scheduler base → Process PCB: queues (evidence: `SimuladorSO/Scheduling/Scheduler.cs`)
- Scheduling policies → Scheduler base: implement (evidence: `SimuladorSO/Scheduling/Scheduler.cs`)
- Interrupt queue → Interrupt types: classifies (evidence: `SimuladorSO/Kernel/Interrupts/Interrupt.cs`)
- Simulation engine → MMU and paging: manages memory with
- MMU and paging → Physical frames: allocates (evidence: `SimuladorSO/Memory/MMU.cs`)
- MMU and paging → Page entries: tracks pages with (evidence: `SimuladorSO/Memory/MMU.cs`)
- MMU and paging → TLB entries: caches translations with (evidence: `SimuladorSO/Memory/MMU.cs`)
- Scheduling benchmark → Simulation engine: runs scenarios on (evidence: `SimuladorSO/Benchmarking/BenchmarkEngine.cs`)
- Scheduling benchmark → Scheduling results: produces (evidence: `SimuladorSO/Benchmarking/BenchmarkEngine.cs`)
- Memory benchmark → Simulation engine: runs scenarios on (evidence: `SimuladorSO/Benchmarking/MemoryBenchmarkEngine.cs`)
- Memory benchmark → Memory results: produces (evidence: `SimuladorSO/Benchmarking/MemoryBenchmarkEngine.cs`)
