A command-line based Operating System Simulator built in C/C++. This project demonstrates core OS concepts like process scheduling, memory management, and file systems through an interactive shell.
- Shortest Job First (SJF)
- (Extendable to FCFS, Round Robin, Priority Scheduling)
- Paging simulation
- Page fault calculation
- (Extendable to LRU, FIFO, Optimal)
- Create files
- Read files
- Write content
- Delete files
-
Interactive CLI interface
-
Commands:
schedule→ Run CPU schedulingmemory→ Run memory simulationfs→ File system operationsexit→ Quit simulator
- CPU Scheduling Algorithms
- Memory Allocation & Paging
- File System Basics
- Command Line Interface Design
os-simulator/
│
├── main.cpp # Shell interface
├── scheduler.cpp # CPU scheduling logic
├── scheduler.h
├── memory.cpp # Memory management (paging)
├── memory.h
├── filesystem.cpp # File system simulation
├── filesystem.h
└── README.md
g++ main.cpp scheduler.cpp memory.cpp filesystem.cpp -o os./osMini OS Simulator Started...
OS> schedule
Enter number of processes: 3
Burst time for P1: 5
Burst time for P2: 2
Burst time for P3: 8
SJF Order:
P2 P1 P3
OS> memory
Enter number of pages: 5
Enter number of frames: 3
Enter page: 1
Enter page: 2
Enter page: 3
Enter page: 1
Enter page: 4
Page Faults: 4
OS> fs
Commands: create read write delete exit
FS> create file1
FS> write file1
Enter content: Hello World
FS> read file1
Hello World
- Round Robin Scheduling (with time quantum)
- LRU Page Replacement Algorithm
- Multi-threaded process simulation
- User authentication system
- Colored terminal UI
- Logging system
This project is designed to strengthen understanding of fundamental operating system concepts while building a practical, interactive tool. It is suitable for:
- Academic learning
- Demonstrating OS knowledge in interviews
- Enhancing GitHub portfolio
Atharva Sable
Feel free to fork this repository, improve it, and submit a pull request.
This project is open-source and available under the MIT License.