r/osdev • u/caio_troti • 3h ago
Milestone: User Space Reached!
HEYYY, I just want to share that FINALLY I reached the basics of user land!!

3 years ago I posted about my "master plan" that you might checkout here.
Featuring:
- Memory allocation with buddy and slab;
- Timers (heck yeahh);
- Multi task with preemtive switch;
- Scheduler;
- Basic User Space support;
- And a noice generic build and API system, to support the future port for x86 and my custom CPU.
About AI:
The elephant in the room.
No, it's not vibecoded. I do work professionally with AI because yeah, that's what companies are pushing for. But AI don't touch my code here.
Seven years ago I challenged myself into making a OS, so I WANT to know how every single line of code here works. I did use AI to make boring stuff, like populating the entire Keymap table for keyboard support, which honestly is just... hexadecimal number all over the place?
Unfortunately stupid Claude Code marks him as co-author because I use it to automate commits, because again, just boring by today standards.
About my feelings around using AI for OS dev? It changed everything!
I'm not the kind that likes to bang my head against the wall to learn stuff, specially if it's already a solved problem. I like to search how other peoples does it. I've spend countless hours tryng to decifer Linux kernel itself, with dozens of workarounds to make it work in every single CPU since the 70s. Looking for git repos of other OSs to take inspiration.
This project is something that I take my time. I stop when I burnout and came back when I have inspiration, sometimes after 6 to 8 months or over a year. That means I forget the precise details of everything.
AI completely speed up everything. Before, I was hoping to reach user space in about 5 years, and suddently I just reached!
My workflow is basically:
- Ask AI what is next;
- AI spit up explanations on what should I be doing and coding, with some rough examples;
- I try my best to make it;
- When I get tired, I ask AI for a full working code example;
- I manually type everything then goes a long session trying to understand every line.
Also, I don't know how many hours I spend learning about memory. I have a mechatronics engineer degree, I have learned a lot on how the chips works physically. Yet, sometimes I couldn't wrap my head around how I was organizing memory in my own OS.
AI just... understands the code and explain to me like I'm dumb!
Well, to wrap it up, link to repo: https://github.com/caioaletroca/MadeInHeavenOS
The code is obsessivily comented, to avoid my future self to shoot me in the foot.
Edit: With user space, I plan to go micro-kernel because... why not? Seems nice. And to not be another Linux clone.

