MiniOS is a pedagogical operating system built as an advanced extension of the MIT xv6 UNIX-like teaching OS. It introduces modern operating system concepts including dynamic scheduling, advanced memory management, and specialized user space applications.
MiniOS replaces standard xv6 components with advanced subsystems:
-
Dynamic Priority Scheduling: Preemptive scheduling algorithm featuring aging to prevent starvation. It dynamically adjusts process priorities based on CPU usage (applying a penalty for CPU-bound processes) and waiting time (applying an aging increment).
-
Copy-On-Write (COW) Fork: Optimized process creation where the parent and child share physical memory pages upon
fork(). Pages are only duplicated when a process attempts to modify them, managed via a robust reference counting mechanism. -
Advanced File Management System: Dynamic file storage handling creation, reading, writing, and deletion of files in dynamically allocated memory blocks.
-
Garbage Collection: Automatic memory reclamation subsystem that detects unused file blocks and cleans up memory during system idle periods to minimize performance impact.
-
Dynamic Memory Compaction: Eliminates external fragmentation caused by file deletions by reorganizing physical memory and updating internal file references dynamically.
-
Log Keeper: Robust logging mechanism (
logkeeper) designed to reliably record system events, track operations, and assist in debugging and stress testing across the OS.
- Target Architecture: RISC-V / x86 Architecture
- Emulator: QEMU
- Languages: C, Assembly
- Build Tools: GNU Toolchain (gcc, ld, make)
Ensure you have the required RISC-V or x86 toolchain installed, QEMU (e.g., qemu-system-riscv64 or qemu-system-i386), and Python 3.
- Clone the repository and navigate to the project root.
- Compile and run the OS using the custom runner script:
python run_os.py
- To view available commands once booted, explore the user space programs or refer to system binaries (e.g.,
helpif implemented).
MiniOS Version 1.0 core subsystems were developed by:
- Taksh Mehta: Dynamic Priority Scheduling
- Aditya Sharma: Paging with Copy-On-Write (COW)
- Ved Mitra Verma: File Management System & Garbage Collection
- Mayank Tiwari: Dynamic Memory Compaction
XV6 ACKNOWLEDGMENTS: xv6 is inspired by John Lions's Commentary on UNIX 6th Edition. MiniOS builds upon the foundational work provided by the MIT PDOS group.