Kernel development project that models core OS subsystems in C. This repository is structured like a teaching kernel but runs as a user-space simulation so it can be built and tested on any Unix-like machine.
- Process management with lightweight process objects and lifecycle helpers.
- Thread scheduling with a runnable queue and explicit thread states.
- Synchronization primitives (mutex) with contention reporting.
- Virtual memory model with page-fault handling, protection checks, and file-backed mappings.
- Virtual file system interface with a simple in-memory node table used for paging.
- Page allocator with fixed-size page frames for deterministic tests.
src/kernel.centry point and system initializationsrc/proc/process.cprocess modelsrc/sched/scheduler.ccooperative schedulersrc/sync/mutex.cmutex primitivesrc/vm/vm.cvirtual memory subsystem with file-backed mappingsrc/vfs/vfs.cvirtual file system layersrc/mm/page.cpage allocatorinclude/public headersdocs/design notes and usagetests/unit tests for core subsystems
make
./bin/kernel_simmake testgdb ./bin/kernel_sim
(gdb) break vm_handle_page_fault
(gdb) rundocs/architecture.mddocs/build.mddocs/testing.mddocs/gdb.md