# krishanuz/os-project architecture

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

- Interactive diagram: https://gitdiagram.com/krishanuz/os-project
- Repository: https://github.com/krishanuz/os-project

## Overview

This repository is a C operating-systems scheduling simulator built around process records in a sentinel-based doubly linked list. Its principal workflow is to provide a ready queue to a scheduling algorithm, compute timing metrics, and display the resulting records. The README also documents list insertion, removal, cleanup, and sorting. FCFS is implemented; SJF is only a stub, and the sampled sources do not show a complete user-facing execution path. Edges reflect visible calls or documented behavior; unsampled wiring is omitted.

Main entry points: [`src/node.c`](https://github.com/krishanuz/os-project/blob/main/src/node.c) (Process node), [`src/list.c`](https://github.com/krishanuz/os-project/blob/main/src/list.c) (Queue operations), [`src/scheduler.c`](https://github.com/krishanuz/os-project/blob/main/src/scheduler.c) (FCFS scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_records["Process records"]
  node_process["Process node<br/>[node.c]"]
end

subgraph group_queue["Ready queue"]
  node_queue_state["List state<br/>[list.c]"]
  node_queue_ops["Queue operations<br/>[list.c]"]
  node_sorting["Process sorting<br/>[list.c]"]
  node_display["Metric display<br/>[list.c]"]
end

subgraph group_scheduling["Scheduling"]
  node_fcfs["FCFS scheduler<br/>[scheduler.c]"]
  node_sjf["SJF stub<br/>[scheduler.c]"]
end

node_user(("Caller"))

node_user -.->|"invokes"| node_fcfs
node_queue_state -->|"creates sentinels"| node_process
node_queue_ops -->|"inserts records"| node_process
node_queue_ops -->|"destroys records"| node_process
node_fcfs -->|"reads queue"| node_queue_state

click node_process "https://github.com/krishanuz/os-project/blob/main/src/node.c"
click node_queue_state "https://github.com/krishanuz/os-project/blob/main/src/list.c"
click node_queue_ops "https://github.com/krishanuz/os-project/blob/main/src/list.c"
click node_sorting "https://github.com/krishanuz/os-project/blob/main/src/list.c"
click node_display "https://github.com/krishanuz/os-project/blob/main/src/list.c"
click node_fcfs "https://github.com/krishanuz/os-project/blob/main/src/scheduler.c"
click node_sjf "https://github.com/krishanuz/os-project/blob/main/src/scheduler.c"

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_process toneBlue
class node_queue_state,node_queue_ops,node_sorting,node_display toneAmber
class node_fcfs,node_sjf toneMint
class node_user toneIndigo
```

## Components

### Process records

- [Process node](https://github.com/krishanuz/os-project/blob/main/src/node.c): `src/node.c`

### Ready queue

- [List state](https://github.com/krishanuz/os-project/blob/main/src/list.c): `src/list.c`
- [Queue operations](https://github.com/krishanuz/os-project/blob/main/src/list.c): `src/list.c`
- [Process sorting](https://github.com/krishanuz/os-project/blob/main/src/list.c): `src/list.c`
- [Metric display](https://github.com/krishanuz/os-project/blob/main/src/list.c): `src/list.c`

### Scheduling

- [FCFS scheduler](https://github.com/krishanuz/os-project/blob/main/src/scheduler.c): `src/scheduler.c`
- [SJF stub](https://github.com/krishanuz/os-project/blob/main/src/scheduler.c): `src/scheduler.c`

### Other components

- **Caller**

## Connections

- Caller → FCFS scheduler: invokes
- List state → Process node: creates sentinels (evidence: `src/list.c`)
- Queue operations → Process node: inserts records (evidence: `src/list.c`)
- Queue operations → Process node: destroys records (evidence: `src/list.c`)
- FCFS scheduler → List state: reads queue (evidence: `src/scheduler.c`)
