mentos-team/MentOS
Tentang
An educational 32-bit linux-like Operating System, with public bachelor- and master-level course slides.
Pembelajaran dan pendidikanYang dapat Anda lakukan
- ✅ Process management (fork, exec, wait, signals)
- ✅ Memory management (paging, buddy system, slab allocator)
- ✅ File systems (VFS, EXT2, procfs)
- ✅ Device drivers (keyboard, ATA, RTC, video)
Pertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- -1
- dalam 15 hari
- -1
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli
Mentoring Operating System — an educational 32-bit Linux-like operating system
Learn the kernel. Understand the system. Shape it.
📢 Note: The default branch is
develop. Pull requests go there;mainonly ever receives release merges.
What is MentOS?
MentOS (Mentoring Operating System) is an open-source educational operating system designed for learning OS development. It provides a realistic yet understandable environment that follows Linux design patterns.
Why MentOS?
- ✅ Follows Linux guidelines - Similar data structures and algorithms
- ✅ Beginner-friendly - Well-documented, easy to understand
- ✅ Fully functional - Real processes, filesystems, drivers, and syscalls
- ✅ Fast to compile - Builds in seconds on modern hardware
- ✅ Hands-on learning - Modify and extend real OS features
Quick Start
# Clone the repository
git clone https://github.com/mentos-team/MentOS.git
cd MentOS
# Build
mkdir build && cd build
cmake ..
make
# Create filesystem
make filesystem
# Run in QEMU
make qemu
Login: Use root or user (from filesystem/etc/passwd)
The build is freestanding: the kernel and the userspace programs are linked
against the C library in lib/, and never against the host's. A host gcc
that cannot produce a 32-bit hosted binary — no crti.o, no Scrt1.o — is
not a problem here, and gcc-multilib is not a prerequisite.
📚 Documentation
All documentation is in the Wiki:
Getting Started
- Getting Started - Set up your environment
- Building MentOS - Compile the OS
- Running MentOS - Boot in QEMU or GRUB
Understanding the Codebase
- Architecture - Project structure
- Kernel - Kernel components and data structures
- C Library - Standard library implementation
- System Calls - 60+ syscall reference
- Filesystem - VFS, EXT2, and ProcFS
- IPC - Semaphores, message queues, shared memory
- Programs - Userspace utilities (40+)
Development
- Development Guide - Add programs and features
- Unit Testing - Run the test suites and read their results
- Debugging - GDB and kernel logging
- Contributing - Contribution guidelines
- Features - Feature roadmap with priorities
Changing a subsystem
The wiki introduces the system; docs/maintainer/
is the reference for changing it. It lives in the repository so that it moves
with the code, and it is written for whoever is about to touch a subsystem
rather than for whoever is learning what it does.
- Maintainer knowledge base - Index, subsystem map, and the invariants each one relies on
- Testing and CI - How both suites run, and how to tell a real pass from a green exit code
- Security model - The kernel/user boundary and what is trusted where
- Debugging playbook - Reproducing a failure that only happens in the guest
Project Structure
mentos/
├── boot/ ← Bootloader (first code executed)
├── kernel/ ← Core OS (processes, memory, drivers, syscalls)
├── lib/ ← C library + system call wrappers
├── userspace/ ← User programs (40+) and tests (60+)
├── filesystem/ ← Root filesystem content (becomes rootfs.img)
├── iso/ ← GRUB boot configuration
├── scripts/ ← Test runners (run-qemu-test, tapview)
├── cmake/ ← Cross-toolchain file
├── docs/ ← Maintainer documentation
└── CMakeLists.txt ← Build configuration
Features
- ✅ Process management (fork, exec, wait, signals)
- ✅ Memory management (paging, buddy system, slab allocator)
- ✅ File systems (VFS, EXT2, procfs)
- ✅ Device drivers (keyboard, ATA, RTC, video)
- ✅ System calls (60+ POSIX-like syscalls)
- ✅ IPC (semaphores, message queues, shared memory)
- ✅ Multiple schedulers (RR, Priority, CFS, EDF, RM, AEDF)
- ✅ User/group management (passwd, shadow, permissions)
- ✅ Shell with pipes and job control
- ✅ 40+ userspace programs (ls, cat, ps, etc.)
- ✅ 60+ test programs
See Features for the complete list of implemented features and roadmap.
Debugging
# GDB debugging (two terminals needed)
make qemu-gdb # Terminal 1: Start QEMU
gdb --command=gdb.run # Terminal 2: Attach GDB
See the Debugging Guide for details.
Contributing
We welcome contributions! Please see the Contributing Guide.
Quick contribution steps
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes following our coding guidelines
- Commit using Conventional Commits:
git commit -m "feature(scope): description" - Push and open a Pull Request
Contributors
Project Manager: Enrico Fraccaroli
Developers: Alessandro Danese, Luigi Capogrosso, Mirco De Marchi, Andrea Cracco, Linda Sacchetto, Marco Berti, Daniele Nicoletti, Filippo Ziche, and many valuable contributors.
Credits
Parts of MentOS are inherited or inspired by DreamOS by Ivan Gualandri.
License
See LICENSE.md for details.
Happy hacking! 🎉
Jelajahi proyek terkait
Memuat…