# fairuzanam007/cse-402---operating-system-lab architecture

> Architecture diagram of the GitHub repository fairuzanam007/cse-402---operating-system-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fairuzanam007/cse-402---operating-system-lab
- Repository: https://github.com/fairuzanam007/cse-402---operating-system-lab

## Overview

This repository is a set of standalone CSE-402 operating-systems lab exercises, not a shared application. The user runs an exercise script to calculate and print scheduling metrics or page-replacement results. The sampled scripts show FCFS and SJF scheduling, preemptive and non-preemptive SJF, and FIFO/MRU page replacement. Priority scheduling and disk scheduling are present in the file tree, but their implementations were not sampled, so their internal behavior and result flows are not asserted.

Main entry points: [`LAB 1 - (FCFS).py`](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%201%20-%20(FCFS).py) (FCFS scheduling), [`LAB 2 - (SJF WITH FCFS).py`](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%202%20-%20(SJF%20WITH%20FCFS).py) (FCFS/SJF comparison), [`LAB 3 - (SJF Preemptive & Non Preemptive).py`](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%203%20-%20(SJF%20Preemptive%20%26%20Non%20Preemptive).py) (SJF variants), [`LAB - 7 ( FIFO & MRU) Page Replacement Algo .py`](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%20-%207%20%20(%20FIFO%20%26%20MRU)%20Page%20Replacement%20Algo%20.py) (FIFO/MRU replacement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cpu["CPU Scheduling"]
  node_fcfs["FCFS scheduling<br/>[LAB 1 - &#40;FCFS&#41;.py]"]
  node_sjfcompare["FCFS/SJF comparison"]
  node_sjfvariants["SJF variants"]
  node_priority["Priority scheduling"]
  node_schedmetrics["Scheduling metrics"]
end

subgraph group_memory["Memory Management"]
  node_page["FIFO/MRU replacement"]
  node_pageresults["Page results"]
end

subgraph group_disk["Disk Scheduling"]
  node_diskalgos["FCFS/SSTF scheduling"]
end

node_user(("Lab user"))

node_user -.->|"runs"| node_fcfs
node_user -.->|"runs"| node_sjfcompare
node_user -.->|"runs"| node_sjfvariants
node_user -.->|"runs"| node_priority
node_user -.->|"runs"| node_page
node_user -.->|"runs"| node_diskalgos
node_fcfs -->|"prints"| node_schedmetrics
node_sjfcompare -->|"prints"| node_schedmetrics
node_sjfvariants -->|"prints"| node_schedmetrics
node_page -->|"prints"| node_pageresults

click node_fcfs "https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%201%20-%20(FCFS).py"
click node_sjfcompare "https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%202%20-%20(SJF%20WITH%20FCFS).py"
click node_sjfvariants "https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%203%20-%20(SJF%20Preemptive%20%26%20Non%20Preemptive).py"
click node_priority "https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%204%20%26%205%20-%20Priority%20Scheduling%20(Non-Preemptive%2C%20Lower%20Priority%20Preemptive%20%26%20Higher%20Priority%20Preemptive)"
click node_page "https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%20-%207%20%20(%20FIFO%20%26%20MRU)%20Page%20Replacement%20Algo%20.py"
click node_diskalgos "https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%20-%206%20(FCFS%20%26%20SSTF%20Disk%20Scheduling.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_fcfs,node_sjfcompare,node_sjfvariants,node_priority,node_schedmetrics,node_user toneBlue
class node_page,node_pageresults toneAmber
class node_diskalgos toneMint
```

## Components

### CPU Scheduling

- [FCFS scheduling](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%201%20-%20(FCFS).py): `LAB 1 - (FCFS).py`
- [FCFS/SJF comparison](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%202%20-%20(SJF%20WITH%20FCFS).py): `LAB 2 - (SJF WITH FCFS).py`
- [SJF variants](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%203%20-%20(SJF%20Preemptive%20%26%20Non%20Preemptive).py): `LAB 3 - (SJF Preemptive & Non Preemptive).py`
- [Priority scheduling](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%204%20%26%205%20-%20Priority%20Scheduling%20(Non-Preemptive%2C%20Lower%20Priority%20Preemptive%20%26%20Higher%20Priority%20Preemptive)): `LAB 4 & 5 - Priority Scheduling (Non-Preemptive, Lower Priority Preemptive & Higher Priority Preemptive)`
- **Scheduling metrics**

### Memory Management

- [FIFO/MRU replacement](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%20-%207%20%20(%20FIFO%20%26%20MRU)%20Page%20Replacement%20Algo%20.py): `LAB - 7 ( FIFO & MRU) Page Replacement Algo .py`
- **Page results**

### Disk Scheduling

- [FCFS/SSTF scheduling](https://github.com/fairuzanam007/cse-402---operating-system-lab/blob/main/LAB%20-%206%20(FCFS%20%26%20SSTF%20Disk%20Scheduling.py)): `LAB - 6 (FCFS & SSTF Disk Scheduling.py)`

### Other components

- **Lab user**

## Connections

- Lab user → FCFS scheduling: runs
- Lab user → FCFS/SJF comparison: runs
- Lab user → SJF variants: runs
- Lab user → Priority scheduling: runs
- Lab user → FIFO/MRU replacement: runs
- Lab user → FCFS/SSTF scheduling: runs
- FCFS scheduling → Scheduling metrics: prints (evidence: `LAB 1 - (FCFS).py`)
- FCFS/SJF comparison → Scheduling metrics: prints (evidence: `LAB 2 - (SJF WITH FCFS).py`)
- SJF variants → Scheduling metrics: prints (evidence: `LAB 3 - (SJF Preemptive & Non Preemptive).py`)
- FIFO/MRU replacement → Page results: prints (evidence: `LAB - 7  ( FIFO & MRU) Page Replacement Algo .py`)
