# cibit0/so architecture

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

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

## Overview

This repository is a collection of operating-systems coursework exercises, not one integrated application. Its user-to-result paths are independent: P1 programs demonstrate process trees, signals, shared memory, and pipes; P2 demonstrates TCP file transfer and bounded-buffer concurrency; P3 reads process-arrival data, simulates contiguous-memory allocation, and writes textual and HTML results. The graph groups these distinct practices and shows the principal runtime stages. P2 concurrency details and some P3 implementation stages are based on README documentation because their source was not sampled.

Main entry points: [`p2/comunicaciones_red/Cliente.c`](https://github.com/cibit0/so/blob/main/p2/comunicaciones_red/Cliente.c) (TCP Client), [`p3/gestormemoria.py`](https://github.com/cibit0/so/blob/main/p3/gestormemoria.py) (Simulation Menu), [`p2/comunicaciones_red/Servidor.c`](https://github.com/cibit0/so/blob/main/p2/comunicaciones_red/Servidor.c) (TCP Server), [`p1/malla.c`](https://github.com/cibit0/so/blob/main/p1/malla.c) (Process Mesh)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_p1["P1 Process Exercises"]
  node_malla["Process Mesh<br/>[malla.c]"]
  node_pstree_malla["Process Tree View"]
  node_ejec["Signal Process Tree<br/>[ejec.c]"]
  node_pstree_ejec["Process Tree View"]
  node_hacha["File Fragmenter<br/>[hacha.c]"]
  node_fragment_input["Input File<br/>[texto_hacha.txt]"]
  node_hijos["Shared-Memory Processes<br/>[hijos.c]"]
end

subgraph group_network["P2 Network Transfer"]
  node_client["TCP Client<br/>[Cliente.c]"]
  node_server["TCP Server<br/>[Servidor.c]"]
  node_html_source["Served HTML<br/>[Google.html]"]
  node_received_html["Received HTML"]
end

subgraph group_concurrency["P2 Concurrency"]
  node_bounded_buffer["Producer Consumer"]
end

subgraph group_memory["P3 Memory Simulation"]
  node_process_input["Process Input<br/>[procesos.txt]"]
  node_memory_cli["Simulation Menu<br/>[gestormemoria.py]"]
  node_process_parser["Process Parser<br/>[gestormemoria.py]"]
  node_allocator["Partition Allocator<br/>[gestormemoria.py]"]
  node_result_writer["State Renderer<br/>[gestormemoria.py]"]
  node_text_output["Partition Text"]
  node_html_output["Partition HTML"]
end

node_user(("User"))
node_browser(("Client Browser"))

node_user -->|"runs"| node_malla
node_malla -->|"runs command"| node_pstree_malla
node_user -->|"runs"| node_ejec
node_ejec -->|"runs command"| node_pstree_ejec
node_user -->|"runs"| node_hacha
node_hacha -.->|"reads file"| node_fragment_input
node_user -->|"runs"| node_hijos
node_user -->|"starts"| node_server
node_user -->|"starts"| node_client
node_client -->|"connects TCP"| node_server
node_server -->|"reads file"| node_html_source
node_server -->|"sends file"| node_client
node_client -->|"saves transfer"| node_received_html
node_client -->|"opens file"| node_browser
node_user -->|"runs"| node_bounded_buffer
node_user -->|"runs"| node_memory_cli
node_memory_cli -->|"reads input"| node_process_input
node_memory_cli -->|"parses processes"| node_process_parser
node_memory_cli -->|"simulates allocation"| node_allocator
node_allocator -->|"renders states"| node_result_writer
node_result_writer -->|"writes text"| node_text_output
node_result_writer -->|"writes HTML"| node_html_output

click node_malla "https://github.com/cibit0/so/blob/main/p1/malla.c"
click node_ejec "https://github.com/cibit0/so/blob/main/p1/ejec.c"
click node_hacha "https://github.com/cibit0/so/blob/main/p1/hacha.c"
click node_fragment_input "https://github.com/cibit0/so/blob/main/p1/texto_hacha.txt"
click node_hijos "https://github.com/cibit0/so/blob/main/p1/hijos.c"
click node_client "https://github.com/cibit0/so/blob/main/p2/comunicaciones_red/Cliente.c"
click node_server "https://github.com/cibit0/so/blob/main/p2/comunicaciones_red/Servidor.c"
click node_html_source "https://github.com/cibit0/so/blob/main/p2/comunicaciones_red/Google.html"
click node_bounded_buffer "https://github.com/cibit0/so/blob/main/p2/concurrencia/ProductorConsumidor.cm"
click node_process_input "https://github.com/cibit0/so/blob/main/p3/procesos.txt"
click node_memory_cli "https://github.com/cibit0/so/blob/main/p3/gestormemoria.py"
click node_process_parser "https://github.com/cibit0/so/blob/main/p3/gestormemoria.py"
click node_allocator "https://github.com/cibit0/so/blob/main/p3/gestormemoria.py"
click node_result_writer "https://github.com/cibit0/so/blob/main/p3/gestormemoria.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_malla,node_pstree_malla,node_ejec,node_pstree_ejec,node_hacha,node_fragment_input,node_hijos,node_user,node_browser toneBlue
class node_client,node_server,node_html_source,node_received_html toneAmber
class node_bounded_buffer toneMint
class node_process_input,node_memory_cli,node_process_parser,node_allocator,node_result_writer,node_text_output,node_html_output toneRose
```

## Components

### P1 Process Exercises

- [Process Mesh](https://github.com/cibit0/so/blob/main/p1/malla.c): `p1/malla.c`
- **Process Tree View**
- [Signal Process Tree](https://github.com/cibit0/so/blob/main/p1/ejec.c): `p1/ejec.c`
- **Process Tree View**
- [File Fragmenter](https://github.com/cibit0/so/blob/main/p1/hacha.c): `p1/hacha.c`
- [Input File](https://github.com/cibit0/so/blob/main/p1/texto_hacha.txt): `p1/texto_hacha.txt`
- [Shared-Memory Processes](https://github.com/cibit0/so/blob/main/p1/hijos.c): `p1/hijos.c`

### P2 Network Transfer

- [TCP Client](https://github.com/cibit0/so/blob/main/p2/comunicaciones_red/Cliente.c): `p2/comunicaciones_red/Cliente.c`
- [TCP Server](https://github.com/cibit0/so/blob/main/p2/comunicaciones_red/Servidor.c): `p2/comunicaciones_red/Servidor.c`
- [Served HTML](https://github.com/cibit0/so/blob/main/p2/comunicaciones_red/Google.html): `p2/comunicaciones_red/Google.html`
- **Received HTML**

### P2 Concurrency

- [Producer Consumer](https://github.com/cibit0/so/blob/main/p2/concurrencia/ProductorConsumidor.cm): `p2/concurrencia/ProductorConsumidor.cm`

### P3 Memory Simulation

- [Process Input](https://github.com/cibit0/so/blob/main/p3/procesos.txt): `p3/procesos.txt`
- [Simulation Menu](https://github.com/cibit0/so/blob/main/p3/gestormemoria.py): `p3/gestormemoria.py`
- [Process Parser](https://github.com/cibit0/so/blob/main/p3/gestormemoria.py): `p3/gestormemoria.py`
- [Partition Allocator](https://github.com/cibit0/so/blob/main/p3/gestormemoria.py): `p3/gestormemoria.py`
- [State Renderer](https://github.com/cibit0/so/blob/main/p3/gestormemoria.py): `p3/gestormemoria.py`
- **Partition Text**
- **Partition HTML**

### Other components

- **User**
- **Client Browser**

## Connections

- User → Process Mesh: runs (evidence: `README.md`)
- Process Mesh → Process Tree View: runs command (evidence: `p1/malla.c`)
- User → Signal Process Tree: runs (evidence: `README.md`)
- Signal Process Tree → Process Tree View: runs command (evidence: `p1/ejec.c`)
- User → File Fragmenter: runs (evidence: `README.md`)
- File Fragmenter → Input File: reads file
- User → Shared-Memory Processes: runs (evidence: `README.md`)
- User → TCP Server: starts (evidence: `README.md`)
- User → TCP Client: starts (evidence: `README.md`)
- TCP Client → TCP Server: connects TCP (evidence: `README.md`)
- TCP Server → Served HTML: reads file (evidence: `p2/comunicaciones_red/Servidor.c`)
- TCP Server → TCP Client: sends file (evidence: `README.md`)
- TCP Client → Received HTML: saves transfer (evidence: `p2/comunicaciones_red/Cliente.c`)
- TCP Client → Client Browser: opens file (evidence: `p2/comunicaciones_red/Cliente.c`)
- User → Producer Consumer: runs (evidence: `README.md`)
- User → Simulation Menu: runs (evidence: `README.md`)
- Simulation Menu → Process Input: reads input (evidence: `README.md`)
- Simulation Menu → Process Parser: parses processes (evidence: `p3/gestormemoria.py`)
- Simulation Menu → Partition Allocator: simulates allocation (evidence: `p3/gestormemoria.py`)
- Partition Allocator → State Renderer: renders states (evidence: `p3/gestormemoria.py`)
- State Renderer → Partition Text: writes text (evidence: `README.md`)
- State Renderer → Partition HTML: writes HTML (evidence: `README.md`)
