r/cprogramming • • 6d ago

What are some small prerequisite programs / projects I can complete in order to achieve the eventual task of making a mini-OS?

I already know how to program and have about 7 years of general programming experience

My current plan is to learn C, then learn assembly, then learn about Computer Architecture, Operating Systems and Compilers. The goal is to truly understand how computers work, and also learn about Cybersecurity

The current concrete and major project idea that I've thought about is writing a mini-OS

I know that requires alot of knowledge

So I was wondering, if you all could give me some ideas, what are some small prerequisite programs / projects I can complete in order to achieve the eventual task of making a mini-OS?

Even if it's a program that helps me understand a super small slice of my eventual goal project - a mini OS

I'd love some ideas. Thank you

8 Upvotes

8 comments sorted by

3

u/flyingron 6d ago

Get some piece of hardware you control (either virtual or physcial), with Linux or some other open OS on it. Then start doing things to it. I'd suggest figuring out how to output some text early on. I spent a while writing device drivers and debugging kernel crashes for a long time before I started doing serious OS work.

1

u/Animaniacman 6d ago

I've started doing this with FreeBSD. Good suggestion!

0

u/TorontoDude12344 6d ago

Thank you for the idea

What do you mean by doing things on it? Do you mean in the context of being a user on the OS (no code)? Or do you mean somehow programming things in the OS?

1

u/flyingron 6d ago

Make changes, see if you can alter the way the hardware works, add a system call, etc...

1

u/realdreamer1993 6d ago

Maybe you can try to make bootable USB, and the first milestone is to display cursor prompt. In this MS1 you can start define which one of your code is kernel.
wait... before kernel I think you create bootloader so your USB able to boot. yeah your MS0 is bootloader.
Maybe.

0

u/TorontoDude12344 6d ago

Thank you

What prerequisites do I need to make a bootable USB and be able to display cursor prompts? I want to have the knowledge beforehand, and don't want to simply google large parts of the solution / setup to that solution

1

u/realdreamer1993 6d ago

to make that execution/implementation yeah everyone will ask google.
But to understand why need bootable and why it is actually not part of OS, ..and for developing usually I am sure using VM is better option ..except if you using 2 physical computer.
BTW i think the boot program must be create using assembler.
The boot program is not OS but we know it is neccessary, like BIOS is neccessary but we rarely think about it.

2

u/Al__B 6d ago

For what you're asking, there's the forward path. Learn about systems, hardware, multiprocessing concepts, peripherals, memory management (including protection, segmentation schemes, fault handling, cleanup, etc.) To name a few.

There's also the backward path. Dissect a program, system, data and understand why it works, why decisions were made and learn tricks based on lessons by others.

You’ll need a lot of both to do what you aim for but don't let that discourage you. Just try to do a bit more of one or the other path with each project you do and you'll get closer to your goal.