This project consists of developing a mini operating system (n7OS) for x86 PCs, written in C and assembly.
The goal is to understand and implement the core mechanisms of an operating system from scratch.
- Basic I/O management (keyboard and screen)
- Interrupt handling
- Process management
- Virtual memory management for processes
- File system management
- Resource sharing and inter-process communication
- Console display
- Interrupt management
- System calls
Topics:
- Console implementation
- write system call
- Timer management
- Process creation and destruction
- Scheduling and round-robin execution
Topics:
- Timer interrupt
- Process scheduling and management
- Keyboard input
- Command interpreter
Topics:
- Keyboard reading and read system call
- Simple shell implementation
sudo apt-get install build-essentialsudo apt-get install qemusudo apt-get install gdbGDB connects to QEMU to help detect and analyze potential issues.
Note
Commands are for Debian and derivatives (I use Ubuntu). Adapt based on your Linux distribution.
On Mac: Use x86 gcc tools via macports (package i386-elf-gcc).
/boot- Boot directory;
crt0.Sinitializes hardware and starts the main system program (kernel_start)
/kernel- Kernel source directory
- This is where most things will happen
/lib- Some useful tools (e.g.,
printf)
- Some useful tools (e.g.,
/include- For
.hfiles
- For
- Compilation via
makecommand- If all goes well, result:
kernel.bin
- If all goes well, result:
- Execution:
make run- A QEMU window should appear
- The system runs
- Debugging
- Launch:
make dbg - Set breakpoint at system start:
b kernel_start - Run execution:
contorr - Display a variable:
displayvariable name n: Next,s: Step
- Launch:
makeResult :
kernel.bin
make runA QEMU window should appear and the OS will start.
make dbgThen inside GDB:
b kernel_start # Set breakpoint at system start
cont or r # Run
display <variable> # Show variable value
n # Next
s # Step intohelprun runnerrun snake


