# 4rnv/process-scheduling-sim architecture

> Architecture diagram of the GitHub repository 4rnv/process-scheduling-sim, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/4rnv/process-scheduling-sim
- Repository: https://github.com/4rnv/process-scheduling-sim

## Overview

##### Main Components

a. Frontend Layer:
- Streamlit Web Interface (represented by Hello.py)
- User Input/Configuration Components
- Visualization Components

b. Core Processing Layer:
- Scheduling Algorithm Implementations (likely in utils.py)
- Process Management System
- Simulation Engine

c. Algorithm Modules:
- FCFS Implementation
- SJF Implementation
- SRTF Implementation
- RR Implementation

**[User Interface Layer]**
- ↓
**[Core Processing Layer]**
- ↓
**[Algorithm Layer]**

##### Detailed Component Relationships

**[Web Browser] → [Streamlit Server]**
- ↓
**[User Input Handler] → [Simulation Engine]**
- ↓
**[Algorithm Selector] → [Specific Algorithm]**
- ↓
**[Results Visualizer] → [Web Display]**

##### Key Elements to Highlight

- Input Processing Flow:
How user inputs (process details, algorithm selection) flow through the system

- Algorithm Selection Logic:
Demonstrate how the system switches between different scheduling algorithms

- Visualization Pipeline:
How results are processed and displayed back to the user

##### Technical Details

- Streamlit framework integration
- Python runtime environment
- Any external libraries used for visualization
- Configuration management (via .streamlit/config.toml)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Browser
        WB[Web Browser]
    end

    subgraph StreamlitServer
        SI[Streamlit Interface]:::frontend
        click SI "https://github.com/4rnv/process-scheduling-sim/blob/main/Hello.py"
    end

    subgraph UserInterface
        UI[User Input Handler]:::frontend
        AS[Algorithm Selector]:::frontend
        VIS[Results Visualizer]:::frontend
    end

    subgraph CoreProcessing
        SE[Simulation Engine]:::core
        PM[Process Management]:::core
        click SE "https://github.com/4rnv/process-scheduling-sim/blob/main/utils.py"
        click PM "https://github.com/4rnv/process-scheduling-sim/blob/main/utils.py"
    end

    subgraph Algorithms
        FCFS[First Come First Serve]:::algorithm
        SJF[Shortest Job First]:::algorithm
        SRTF[Shortest Remaining Time First]:::algorithm
        RR[Round Robin]:::algorithm
        click FCFS "https://github.com/4rnv/process-scheduling-sim/blob/main/utils.py"
        click SJF "https://github.com/4rnv/process-scheduling-sim/blob/main/utils.py"
        click SRTF "https://github.com/4rnv/process-scheduling-sim/blob/main/utils.py"
        click RR "https://github.com/4rnv/process-scheduling-sim/blob/main/utils.py"
    end

    subgraph Configuration
        SC[Streamlit Config]:::config
        DC[Development Config]:::config
        DP[Dependencies]:::config
        click SC "https://github.com/4rnv/process-scheduling-sim/blob/main/.streamlit/config.toml"
        click DC "https://github.com/4rnv/process-scheduling-sim/blob/main/.devcontainer/devcontainer.json"
        click DP "https://github.com/4rnv/process-scheduling-sim/blob/main/requirements.txt"
    end

    WB --> SI
    SI --> UI
    UI --> SE
    AS --> SE
    SE --> PM
    PM --> FCFS & SJF & SRTF & RR
    FCFS & SJF & SRTF & RR --> VIS
    VIS --> SI
    SC & DC & DP -.-> SI

    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef algorithm fill:#e67e22,stroke:#d35400,color:white
    classDef config fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Legend
    subgraph Legend
        F[Frontend Components]:::frontend
        C[Core Components]:::core
        A[Algorithm Components]:::algorithm
        CF[Configuration Files]:::config
    end
```
