Bare-bones Operating System
1. Bare-bones Operating System (from scratch)
In 2009, I had an interest to learn about low-level details in how an OS boots.
I found a few websites where people described usage of C++ on bare-bones systems (without an existing OS). I starting making my own OS, targeting 32-bit X86 systems (In hindsight, I should have targeted 64-bit systems). I quickly began to appreciate how much we rely on libc -- I ended up reimplementing my own 'printf' routine.
- How does one actually boot a processor and begin executing C code
- What is needed to use C++ at the kernel/OS level?
- Why are desktop operating systems so bloated? [I still don't understand the insanity]
- Strong desire to avoid API quirks of libc/POSIX systems. (POSIX may be a standard, but that doesn't make it a good one)
- Can be booted from GRUB or any similar boot loader
- Reads multiboot header from grub to determine physical memory size and command-line parameters
- Allows dynamic registration of interrupt handlers in an abstract manner
- Implements X86 system timer driver / interrupt handling
- Implements custom-printf routine, with colors
- Implements Thread context-switching/scheduling
- Enumerates PCI bus using PCI BIOS calls
2. Network stack from scratch
In parallel with my OS effort, I started writing a simple network stack. I developed it using TAP interfaces in Linux so I could develop and test it easily (without worrying about driver issues). It supports:
I had intended to write an RTL8139 network driver and use the network stack with it in the OS. This work is suspended for now...