It's a x86 monolithic preemptive kernel, coded in C++20 and few lines of x86 Assembly.
Why a new half working operating systems? you might ask, And the answer: because it's fun. This is my biggest project so far and I'm really learning a lot of new stuff on the way and enjoying every line I write (until I face a race condition bug, I would hate my life by then). I'm trying my best to work out a clean architecture for this project and maintaining a readable & scalable code base as far as i can (it might far from perfect right now).
- Virtual Memory.
- Heap Allocator.
- Concurrency in terms of Threads & Processes.
- Basic ELF loader
- Task Synchronization (WaitQueues, Spinlocks, Semaphores and Mutex)
- Inter-process communication (using pipes & sockets)
- Virtual File System.
- User Space.
- A Shell & basic commands like cd, ls, cat...
- PCI bus.
- RTL8139 Ethernet Driver.
- Networking (IPv4, UDP, TCP, ARP and DHCP)
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib build-essential nasm python3 cmake grub2 xorriso mtools qemu
For Windows users, you can build and run the system on WSL1/WSL2 (Windows Subsystem for Linux).
sudo chmod -x build_cross_compiling_tools.sh
sudo ./build_cross_compiling_tools.sh
First, you need to build cross compiler gcc, check out how in this osdev wiki page.
Then, Follow these commands:
git clone --recursive https://github.com/AymenSekhri/CyanOS.git
cd ./CyanOS
mkdir build && cd build
cmake .. -G "Unix Makefiles"
make
And you can boot up the OS in Qemu using:
make run
Add an issue, and I will be happy to answer you.
I would like to thank Andreas Kling, I learned so much from his youtube channel and his great open source project SerenityOS.
- Operating Systems: Internals And Design Principles By William Stallings.
- Operating Systems: Design and Implementation By Albert S. Woodhull and Andrew S. Tanenbaum.
- Brokenthorn Tutorials
- littleosbook Tutorials
- James Molloy Tutorials
- How to Make a Computer Operating System
- OSDev
- Intel Manual