https://github.com/parth1899/os-algorithms-cpp
C++ implementations of key OS algorithms: Process Scheduling, Page Replacement, Memory Management, Disk Scheduling, Deadlock Handling & Address Translation.
https://github.com/parth1899/os-algorithms-cpp
Last synced: over 1 year ago
JSON representation
C++ implementations of key OS algorithms: Process Scheduling, Page Replacement, Memory Management, Disk Scheduling, Deadlock Handling & Address Translation.
- Host: GitHub
- URL: https://github.com/parth1899/os-algorithms-cpp
- Owner: parth1899
- Created: 2023-11-29T18:33:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-26T22:05:59.000Z (over 1 year ago)
- Last Synced: 2025-02-26T23:18:50.698Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OS-Algorithms-CPP
A collection of C++ implementations of fundamental Operating System algorithms, including process scheduling, page replacement, deadlock detection, disk scheduling, and memory management.
## 📂 Repository Structure
```
OS-Algorithms-CPP/
│ README.md
│ Virtual-to-Physical.cpp # Virtual to physical address translation
│
├── DeadLocks/
│ ├── Bankers-ID.cpp # Banker's Algorithm (with ID handling)
│ ├── Bankers.cpp # Standard Banker's Algorithm
│
├── Disk-Scheduling/
│ ├── CSCAN.cpp # C-SCAN (Circular SCAN) Algorithm
│ ├── FCFS.cpp # First Come First Serve (FCFS) Algorithm
│ ├── SCAN.cpp # SCAN (Elevator) Algorithm
│ ├── SSTF.cpp # Shortest Seek Time First (SSTF) Algorithm
│
├── Free-Space-Management/
│ ├── Best-Fit.cpp # Best Fit Memory Allocation
│ ├── First-Fit.cpp # First Fit Memory Allocation
│ ├── Next-Fit.cpp # Next Fit Memory Allocation
│ ├── Worst-Fit.cpp # Worst Fit Memory Allocation
│
├── OS-CP/
│ ├── Phase1.cpp # Phase 1 of OS simulation
│ ├── Phase2.cpp # Phase 2 of OS simulation
│
├── Page-Replacement/
│ ├── FIFO.cpp # First-In-First-Out (FIFO) Page Replacement
│ ├── LRU.cpp # Least Recently Used (LRU) Page Replacement
│ ├── Optimal.cpp # Optimal Page Replacement
│
└── Process-Scheduling/
├── FCFS.cpp # First Come First Serve (FCFS) Scheduling
├── Priority-Non-Preemptive.cpp # Non-Preemptive Priority Scheduling
├── Priority-Preemptive.cpp # Preemptive Priority Scheduling
├── Round-Robin.cpp # Round Robin Scheduling
├── SJF.cpp # Shortest Job First (Non-Preemptive)
├── SRTF.cpp # Shortest Remaining Time First (Preemptive)
```
## 🚀 Features
- **Process Scheduling**: Implements FCFS, SJF, Priority (Preemptive & Non-Preemptive), Round Robin, and SRTF scheduling.
- **Memory Management**: Includes various free-space allocation strategies (Best-Fit, First-Fit, Worst-Fit, Next-Fit).
- **Page Replacement**: Implements FIFO, LRU, and Optimal page replacement algorithms.
- **Disk Scheduling**: Supports FCFS, SCAN, C-SCAN, and SSTF disk scheduling techniques.
- **Deadlock Handling**: Implements Banker's Algorithm for deadlock avoidance.
- **Address Translation**: Virtual-to-Physical address translation simulation.