How hycheng15/yalnix works
Project type and purpose
• This is an educational, monolithic operating system project (“Yalnix”) composed of three modules:
– Device-Driver: hardware and terminal driver code in C
– Yalnix-OS-Kernel: core kernel with process control, memory, syscalls, traps, scheduler
– Yalnix-File-System: user‐level file system with caching and I/O library
• Purpose is to teach OS concepts: driver interface, kernel internals, file system layering.
File structure
• Top level: three sibling directories, each with a Makefile, source, headers, tests.
• Device-Driver: montty.c + include/ + tests/ → hardware abstraction layer for terminals & threads
• Yalnix-OS-Kernel: init.c, memory.c, syscalls.c, trap_handler.c, pcb.{c,h}, globals.c → kernel core
• Yalnix-File-System: yfs.c, yfscall.c, plus subdirectories cache/, fs/, iolib/ → modular FS
• All three modules link into a single OS image; tests simulate user‐level programs exercising each module.
README for additional insights
• Confirms three main components and how they integrate
• Each module has its own build instructions and tests
• No external services—everything runs on bare metal or simulator
• Hardware (CPU, Memory, Disk, Terminal device)
• Device Driver module (montty, hardware.h, terminals.h, threads.h)
• OS Kernel (init, idle, load, globals, memory manager, PCB manager, trap handler, syscalls)
• File System module (yfs, yfscall, cache, fs core, iolib)
• User‐level processes/tests (shell, test programs)
• User processes → syscall API → Kernel
• Kernel → device driver → hardware registers/interrupts
• Kernel → file system calls → FS module → cache layer → disk I/O
• Hardware interrupts → trap handler in kernel → thread scheduler
c. Architectural patterns and principles:
• Layering: Hardware → Driver → Kernel → File System → User space
• Modular separation: each major concern in its own directory/module
• Single address space (educational OS), monolithic kernel
d. Key technologies/frameworks:
• Language: C
• Build: Makefiles & shell scripts
• Testing: C test suites in each module
Final advice
• Every module as its own entity, then connect them according to call flow and data flow
• It reflects the three‐part structure of Device-Driver, OS-Kernel, File-System and their integration