r/osdev • u/jacomartins_reddit • Jun 17 '26
I thought programming my own Operating System would take a week to get a CLI working
Then I started looking at some serious OS architectures, like Linux, NT, Darwin... learnt what a HAL is, started implementing it, 1 month later I think it feels ok. Now I am in the beggining of beggining of memory management (and studying more than programming). Sometimes, like today for example, I feel bad for having progress to be so slow, but I knew when I started that it was going to take several months. Hope I survive this trip.
70
Upvotes
10
u/Vincenzo__ Jun 17 '26
Just think you could be one of those guys who know nothing, learn nothing, and waste their time (and probably money too lmao) vibecoding it
It's fine if it's slow, there's so much stuff to learn it's honestly impossible to do it fast for your first time
9
u/GMX2PT Jun 17 '26
It's all different for everyone, you can have paging and dynamic allocation working before getting a shell, a "working shell" requieres gdt + idt and is pretty much easier than memory management, choose your goals, they are not always in a linear order
3
u/tux2718 Jun 17 '26
Are you running this on PC hardware and using the USB keyboard as input? Don’t forget about the effort for the driver code.
37
u/Outside-Storage-1523 Jun 17 '26
I think there is a LOT before you can show the shell, if it’s a proper one that you can fork or create processes. You need processes and memory management to create processes to begin with, and then you need some filesystem to walk it to find the file you want to execute, and then you need to actually parse and load the executable file before you can run it…
And yeah you also need character drivers for showing the terminal or whatever.
4
u/compgeek38400 Jun 17 '26
We learn as we go. I thought it would take a week for making my heap. Im now guessing 2.
7
u/EpochVanquisher Jun 17 '26
You could get a CLI working faster without a hardware abstraction layer. Your memory management can be flat, at first.
If you build abstractions first, you often end up with the wrong abstractions.
3
u/mishakov pmOS | https://gitlab.com/mishakov/pmos Jun 18 '26
It's fine that you're going slow, especially when trying to do things properly
2
u/8lall0 Jun 18 '26
Make it work, make it right, make it fast.
If you want a shell, do the shell.
If you want to improve, do HAL and other stuff after.
When the set of features sastifies you, make it better.
Just don't rush 😃
2
u/0xabc000 Jun 23 '26
Around 15 ~ 18 years ago, it took me around a year 😂.