How jainul-mansuri/-kernel-lab-cpp works
Mini OS Kernel Simulator is an interactive simulation of processes, CPU scheduling, virtual memory, synchronization, and an inode-based filesystem. The main workflow is to enter commands in the unified shell, create processes, and run the scheduler; users can also request memory accesses and inspect process, queue, memory, and statistics views. The scheduler models CPU bursts and I/O waits, while the MMU provides paging, replacement, and protection. Filesystem operations are a documented product capability, though the sampled CLI excerpt does not show how they are initiated. Some internal memory relationships are left unverified because their implementation excerpts were not provided.
Main entry points: system.cpp Unified CLI · system.hpp System Controller · virtual_memory.cpp Virtual Memory Manager · scheduler.cpp CPU Scheduler
Components 13
Shell and Control
- Program Entry
src/main.cpp - Unified CLI
src/cli/system.cpp - System Controller
src/cli/system.hpp
Process Scheduling
- Process Control Block
src/scheduler/pcb.hpp - CPU Scheduler
src/scheduler/scheduler.cpp
Memory Management
- Virtual Memory Manager
src/memory/virtual_memory/virtual_memory.cpp - Page Structures
src/memory/virtual_memory/memory_types.hpp - Paging
src/paging/paging.cpp - Physical Memory
src/memory/memory.cpp
Synchronization
- Process Mutex
src/core/mutex.cpp
File System
- Inode File System
src/filesystem/filesystem.cpp - Inode and Blocks
src/filesystem/fs_types.hpp
Other components
- Operator
Connections 15
- Operator → Unified CLI: enters commands
README.md - Program Entry → Unified CLI: launches shell
src/main.cpp - Unified CLI → System Controller: dispatches commands
src/cli/system.cpp - System Controller → CPU Scheduler: runs scheduler
- System Controller → Process Control Block: creates process
- System Controller → Virtual Memory Manager: allocates process memory
- CPU Scheduler → Process Control Block: updates process state
src/scheduler/scheduler.cpp - System Controller → Process Mutex: locks resource
- Unified CLI → Virtual Memory Manager: requests memory access
README.md - Unified CLI → CPU Scheduler: displays queues
src/cli/system.cpp - Unified CLI → Virtual Memory Manager: displays memory map
src/cli/system.cpp - Virtual Memory Manager → Page Structures: uses page tables
- Paging → Page Structures: uses page tables
- Physical Memory → Virtual Memory Manager: backs memory frames
- Inode File System → Inode and Blocks: stores inode data
src/filesystem/filesystem.cpp