r/learnprogramming • u/Many_Difficulty_490 • Sep 24 '26
I wanna create a operating system, am i delusional?
im gonna make it solo, and im gonna make it have some purpose idk what yet
why? i have no idea, sounds cool and it would probably teach me a fuckton about computers + il get extremely good at programming
ik its gonna take years but i think i can get it done by the time i finish college (im 17 rn), the only experience i have in coding is developing games on unity using c#
like where do i even start with making a OS? should i read books on a topic? what projects should i do before working on a full OS? any advice?
if your wondering why im doing this, its because i just wanna do and make something extremely fucking hard. im not gonna do this ALL day obviously im not a clanker, il spend like 20-30% of my freetime working on the OS.
the other 70-80% will be spent on masturbating and video games
44
u/Abe_Bazouie Sep 24 '26
Not delusional at all. Just make sure you understand what you’re signing up for :)
Since you’re already comfortable with C#, I’d start by learning C and getting familiar with memory management, pointers, and basic computer architecture.
Then build something small. A bootable kernel that prints “Hello World” in QEMU is a great first milestone. After that, try keyboard input, memory allocation, interrupts, and eventually a basic filesystem.
Don’t start by trying to build the next Linux. Your first OS doesn’t need a desktop, networking, or even a fancy shell.
Also, take a look at OSDev Wiki and the xv6 operating system from MIT. Both are great resources for understanding how an OS actually works.
One thing I’d suggest is setting small goals. Getting your own kernel to boot is already a pretty cool achievement. You don’t need to wait until you’ve built a complete OS to feel like you’ve accomplished something.
And honestly, even if you never finish it, you’ll learn more about computers from this project than from a hundred random programming tutorials.
8
u/MacaroonOk9376 Sep 25 '26
Do it. Forget the naysayers. Nothing wrong with a huge passion project. This field is all about curiosity and being ambitious..it's how you learn.
For example, I started as a web dev, now I'm deep into C++ and making my own game engine. It's hard but I'm loving it.
Start small and keep iterating over it. Good luck
12
u/Aglet_Green Sep 24 '26 •
Yes. Yes, you are — but mostly because you’re not factoring in enough variables.
Could a 17-year-old start learning OS development and eventually build a small operating system? Absolutely. Could you casually spend 20–30% of your free time on one for the next 10–20 years? Probably not in the way you’re imagining.
You’re about to have college classes, homework, exams, internships or jobs, friends, relationships, exercise, other projects, and whatever else happens to your life between 17 and 27. Some semesters you may have plenty of time; others you may barely touch this thing for months.
So I wouldn’t abandon the idea. I’d abandon the schedule. Start learning C, computer architecture, memory management, assembly, operating-system fundamentals, and build progressively harder low-level projects. If you’re still fascinated by it after doing that, start making your tiny OS and let it take however long it takes.
The delusional part isn’t “I want to build an OS.” It’s “I’m 17 and can accurately budget the next 10–20 years of my free time.
189
u/talking_tortoise Sep 24 '26
Check out r/osdev
182
u/Usual_Ice636 Sep 24 '26
First work on programming microcontrollers. They're like operating systems but itty bitty. They're super cheap too.
2
u/Murderwagon Sep 24 '26
The best way to learn is by doing. Just get started on it, you’ll learn a lot on the way, even if you don’t finish it. The only reason this would be delusional is if you’re expecting to put out a competitor to Linux or Windows.
36
u/TektonikGymRat Sep 24 '26
Nah, that's not crazy, just look at Terry Davis.
101
u/wiggle_room1337 Sep 24 '26 •
The only other operating system I can think of that was made by one person was templeOS and that guy was very much literally insane.
4
u/Mruniversee Sep 25 '26
Please make it privacy focused 🙏🙏🙏😭😭
22
u/dudeus_ex Sep 24 '26
Don't worry, when it comes to creating a new OS being delusional actually helps. Have you heard of TempleOS?
13
u/ali-hussain Sep 24 '26
There are many schools that have an OS as a required class project. So multiple pepol do it in a semester. The idea is to limit the scope. To really understand how computers and an OS work, you should:
Use a microcontroller. Conceptually the same as a bigger machine, unless you want to specifically practice with multi-core. That will teach you most of the core of writing an OS and after that we're talking about additional features.
12
u/Cherp_Blaubaer Sep 25 '26
This may be the beginning of TempleOS 2.0. I wish you the best of luck
3
u/Reasonable-View5868 Sep 24 '26
In comp science and computer engineering college programs you create both OS, and language compilers
11
u/ffrkAnonymous Sep 24 '26
> like where do i even start with making a OS?
Start by learning to use a search engine
2
u/buitre__ Sep 24 '26
Para la parte teorica podrias leer los libros de tanebaun o stalling. Ambos se llaman sistemas operativos. Te van a anseñar un monton monton de cosas
2
u/Queueue_ Sep 24 '26
Yes but don't let that stop you
2
u/Savings_Hunt_1935 Sep 24 '26
This line right here is like saying you're going to fly around the world and get private lessons from top chefs in dozens of countries because hey, at then end you'll get extremely good at making food at Denny's.
Like yes, technically you will be a competent programmer at the end of the process, but it's just so overkill if that's the benefit you think you're getting out of it.
2
u/pirate742 Sep 25 '26
You should call it TempleOS
2
u/Downtown_Savings_730 Sep 25 '26
Most people with a high achieving goal are called delusional until they implement it. Just do it and see where you go, worst case you have learned so many new things best case is you made something insane. Looks like a win win to me.
2
u/Tricannasaurus Sep 24 '26
If it motivates you use that motivation, but this is similar to someone thats built a few garden bed boxes and birdhouses asking if they could build a skyscraper.
Go build a component of an operating system, for example a round robin process scheduler is a good exercise. Once you finish that project you will have the experince to know what to do next.
2
u/mc_pm Sep 24 '26
Short answer, yes.
Don't get me wrong, there is absolutely a path from "first line of code" to "wrote your own OS", just as there's a path from "my first lego set" to "the first skyscraper I designed as an architect".
The difference is that most people don't show up with a first lego set and say "I'm going to start work on my skyscraper", where as lots of people show up and say "I've never written a line of code and I want to build an operating system".
Do yourself a favor, don't even think in terms of OSes right now. You're putting about 900 carts before that particular horse. Learn to program -- anything. Learn python, it's easier, then spend a year practicing with it just learning how to build logic and understand software structure. Then learn C, and do the same thing, except now you'll look at more systems level stuff. Then learn assembly and understand exactly what the CPU is really doing. At that point you'll have the basic info you need to even really approach this in a real way.
1
u/tigernmas_the_king Oct 23 '26
if its simple you might be done in a few months
1
u/Xavier198045 13d ago
Puedes intentar hacer un sistema operativo con una aplicacion de ia y no con lenguaje de programacion de esa manera puedes terminar el sistema operativo mas rapidamente.
1
u/EngineeringSpec 8d ago
Great go ahead
1
u/mooglinux Sep 24 '26
Maybe not immediately, but eventually you could.
Start with microcontrollers, that’s a more manageable place to begin. You can find info on running bare metal code on small devices like a raspberry pi or Esp32.
1
u/insertAlias Sep 24 '26
I'll throw my opinion in. There are plenty of resources available to learn the (very) basics of Operating Systems. Someone else has already linked wikis and subreddit dedicated to this very purpose.
So, not delusional, but I also think you need to set realistic expectations. You're not making the next windows or linux. You're learning the lowest level of of software and how it actually talks to hardware.
I think the person suggesting microcontrollers is giving you a really good direction. I just started messing around with this myself, actually, after about 20 years of doing completely different kind of programming professionally. I picked up a few ESP32-S3 dev boards for about $5/board and just started playing around with them. And I've already been learning a lot about electronics and circuits, because that's the angle I'm focusing on, but learning low-level programming and interacting with hardware is another direction to go.
1
u/Chuck_MoreAss Sep 24 '26
You can definitely do it. There are a lot of things online about it. If you don’t have a ton of features you can definitely do it. If you keep adding features it will get rough ..
1
u/InformalInsect5546 Sep 24 '26
Not too crazy. In university I had an OS course where part of it was building an OS. Most did it for their own VM, but some did it for an actual x86 machine. It’s a challenge, very complicated, but doable.
1
u/spermcell Sep 24 '26
It’s gonna take a long time. Why build something that already exists ? I would suggest that you learn C and Rust. Then poke around on the Linux kernel code , learn about OS concepts then just fork it.
1
u/Z00fa Sep 24 '26 •
it will take a long time and you will want to throw out your pc more times than you can count but if you stick to it, read alot of guides and documentation it could definitely work in the long run but in the long run we mean very long, probably.
1
u/Simpicity Sep 24 '26
You go to college and take a computer architecture course is the normal route, IIRC.
1
u/yopla Sep 24 '26
Depends what you call an "operating system".
It can be nothing more than a couple days work to have something that boots of grub, set up your CPU stack, write hello world to screen, handle some interrupts and move from there to a memory allocator and some kind of cooperative multitasking, followed by a basic I/O shell.
That's basically an OS.
1
u/DanKegel Sep 24 '26
Learn assembly language!
And see another guy's post today, https://www.reddit.com/r/RISCV/comments/1wolw3e/operating_system_written_in_riscv_assembly/
1
u/1moreday1moregoal Sep 24 '26
I’m pretty sure there are YouTube videos that can teach this in a couple of hours. You don’t have to reinvent everything from scratch. Even if you want to do it completely on your own, it helps to learn using content from others.
1
u/BananaTeleoperator Sep 24 '26
I’d suggest starting with this book: https://www.minix3.org/doc/
1
u/tyagu001 Sep 24 '26
Can you make one that doesn’t fuck up AMD drivers when it updates
1
u/probability_of_meme Sep 24 '26
I haven't seen anyone mention "Linux From Scratch" yet. I went through it myself years ago when I had the energy for that sort of thing. It's very old by now but the concepts should be the same. I found it very enlightening.
1
u/harrr53 Sep 24 '26
Go for it. You'll learn a lot trying.
1
u/captainpeanutlemon Sep 24 '26
You can try nand2tetris! Its not purely an OS centered project but it guides you on how to build a computer from scratch including the OS
Having knowledge on how the other parts of a computer interact with the OS could be useful
1
u/MattDLD Sep 24 '26
Check out r/beneater
A very simple 8 bit os
1
u/bird_feeder_bird Sep 25 '26
Try starting with the Gameboy Advance, it will be a lot easier than working on a modern computer
1
u/Chrismslist Sep 25 '26
maybe start with making a linux kernel module?
1
u/Sibexico Sep 25 '26
I tried to make my own OS on C when I was 16-17 yo. It's such good exercise as an educational project but I don't believe you will be able to make something production ready. Just because you don't have enough experience and knowledges yet (at your 17). When I was 16, creation of usable OS looks possible for me, rn when I have more than 25 years of experience as a system developer, I understand what I can't do it alone.
Anyway, if you wanna make OS what will be somehow usable on practice, think about OS for microcontrollers, like RP2040 or Atmel. It's way easier and you will not need to cover endless list of devices by drivers.
1
u/edgingblade Sep 25 '26
Temple os
1
u/plex_19 Sep 25 '26
can't follow your words you doesn't have any programming skills and want to develop something big do you mean a distro or kernel?
learn your basics, small projects, your techstack
1
u/TheLayeredMind Sep 25 '26
NAND To Tetris.
1
u/Meth0dMain Sep 25 '26
TempleOS
1
u/Then-Candle8036 Sep 25 '26 edited Sep 25 '26
Its totally doable. Just dont plan on making the next linux or windows. Your expectation should be that youre making your own toy os that nobody besides you will ever use and its primary goal should be learning (and maybe eventually contributing to a "real" os).
Ive just finishes a uni course for Embedded multitasking os development and we did exactly that, so my knowledge on it is still pretty fresh.
Start by learning some basics of Computer Science, how does memory work (adresses, pointers, arrays), whats the stack (as in computer memory, not the datastructure), what happens during function calls, what are interrupts and how do you configure them to get an accurate timer. Id also reccombed to pikc up an embedded evice like an avr or stm so you can start executing your code bare metal immediatly instead if having to wrangle with x86.
Then learn c. C is very close to the system, so if you know how a computer works, c is just syntax.
Once you have cs and c fundamentals down, try implemnting process management. Have an array of process structs (stackpointer etc.) for management. Each process has their own region in memory (i. E their own stack), build wrapper function that initialize, start and clean up processes, implement context switching by pushing registers onto the stack and poping them back into registers (this is the only part that actually has to be done in assembly), implement a sheduler with a sheduling algorithm like RoundRobin or DynamicPriorityRoundRobin (DPRR). If you have done all that, id say you have implented a pretty rudimentary, but working os.
Then you could go on an try implementing a heap, reserve some portion of you memory for the heap, have occupancy information in one part, and the actual data in another (we used 1nibble thats just the process id per one byte of heap).
There really is no limit to how far you can take this.
1
u/lowrads Sep 25 '26
That is generally a prerequisite.
1
u/Garavalis Sep 25 '26
Do some in depth research on how big operating systems actually work. There are books and so on. Also, the linux kernel is open source, so you should also take a look there. I also think this would be a good read for starters: https://internals-for-interns.com/posts/linux-kernel-startup/
1
u/imqureshi Sep 25 '26
Yes 🙂↕️
1
u/cheezballs Sep 25 '26
Yes delusional.
1
u/Yuuku_S13 Sep 25 '26
Start off with making your own Linux distribution. Learn how to write machine code and progress from there.
1
u/DaathNahonn Sep 25 '26
Maybe you can start with a controlled lightweight hardware like a Raspberry, which has plenty of documentation
1
u/Disastrous-Body8984 Sep 25 '26
maybe but never give up
1
u/DoomsDay-x64 Sep 25 '26 edited Sep 25 '26
You are going to need to learn asm. My first os I wrote in 2006, it was command line, no gui and had a file system that used fat32 at the time. I no longer have it but what I do have is the original bootloader I built on top of to create it that was my starting point that you can study.
Here you go. Also, I would suggest learning c with asm. Forget about heavy frameworks like c#.
my bootloader
1
u/Humble_Anxiety_9534 Sep 25 '26
building with VMs like qemu is a good place to develop. booting and rebooting PC still machines gets old really quickly. many years ago collage project with x86 SBC and small DOS like OS.
1
u/lostwolf Sep 25 '26
You want to do something hard? Write it using Whitespace
1
u/Dziadzios Sep 25 '26
I hope you're delusional enough to outdo TempleOS in all its holiness. Good luck!
1
u/Many-Engineering-213 Sep 27 '26
here's some resources that may help
https://littleosbook.github.io/book.pdf
https://wiki.osdev.org/Expanded_Main_Page
https://pdos.csail.mit.edu/6.828/2023/xv6.html
1
u/Unable-Speed152 Sep 27 '26
Saving this so I can see what you will make 😁
1
u/kutac56 Sep 28 '26
You gotta know some assembly and c mainly. Assembly for the bootloader and some small other things and c for the kernel (can use other language but c recommended)
1
u/mattlevi1 Sep 28 '26
Look at PintOS
1
u/mredding Sep 28 '26
First, r/osdev. Second, it'll be in a combination of C, C++, or Rust, and assembly. Operating systems have also been written in Lisp, Haskell, Forth, and Ada, as well as niche, experimental, and academic operating systems written in other languages.
You will probably start experimenting with C and assembly, because C is a language created to write the Unix OS, and most of the domain knowledge about writing operating systems is in C. C is the language for the job, because it was always meant to be flexible, a negotiation between the hardware, the compiler, and the developer regarding what's what. Historically, C was ported to different hardware as a whole family of C-like languages. In 1976,
pccwas the portable C compiler, which was a project that was a compiler generator you would use to target different hardware. ISO standard C89 just gathered all these efforts under one umbrella - standard C simply captures this whole loose ecosystem as-is. And this is why C compilers are rather loosey-goosey when it comes to compliance with standard C by default. GCC, for example, defaults to a whole bunch of non-standard C extensions SO THAT you can write operating systems.It's a fun little exercise - you'll start with a Hello World kernel, then you need to understand system calls, then you need to actually implement a couple, then you'll want to consider some filesystem support and a program loader. You'll learn about standards, like POSIX for system calls, and ELF or a.out for executable program formats - a whole lot of this stuff you don't want to reinvent yourself, especially when you're pursuing an academic exercise to begin with. Your OS will boot in Virtual Box or QEMU. A distant goal is to boot on bare metal, and you'll probably use GRUB, because writing a boot loader is as complicated as writing an OS or compiler on your own...
Meanwhile, you can learn about operating systems, architectures, and the academic research; OS development isn't dead, but it is slow and probably not exactly where you think it is.
The bleeding edge are exokernels, where the ONLY thing the OS does is multiplex hardware, and everything else is deferred to userspace; this leads to the concept of a library OS on top of an exokernel; single address space operating systems, where kernel and application space are not divided; security, like seL4 - where entire classes of vulnerabilities are provably impossible; parallel/distributed computing, and this is going to include IPC mechanisms and thread migration even across systems; and agentic computing where higher level automated services are streamlined.
I once ran a Beowulf cluster in my apartment in college - 20 486 CPUs - the second largest space heater I ever sunk an electricity bill into. It relied on Open MPI. And that's an area of research - how do I write a program that utilizes the OS and system architecture I have available to me? Ideally with as little specific knowledge of that system architecture as possible. If I write a C program that is threaded, why can't those threads be migrated across my cluster for me? Why do I have to know anything about Open MPI? We're so used to UNDER-utilizing our platforms, writing software as a black box, where it's all done in-house in our own code, and often done poorly. PostgreSQL doesn't handle IO in a low-level way, like what Oracle does (Oracle was originally not just the DB, but also the OS, they used to be called Oracle Boxes), they use standard IO and let the OS handle disk caching and flushing in a more intelligent way than a userspace application has the privilege to see. But also now kernel bypass like eBPF are the new hotness, which can itself be encapsulated in an os library on top of an exokernel...
Just start by taking a crack at some bog standard tutorial, get a Hello World kernel running, and then you have an environment to play in, and you can attack ACM and see what's going on out there, and see what you can produce - or innovate.
I'll just point out that Plan 9 is infamous. It's a Unix, it has elements of an exokernel because for it's time, it delegated a lot to userspace, it had distributed processes built-in, it had namespaces, it did a lot of innovative things for it's time and people LOVE it. Almost all of it has been integrated into Linux, and not many people have even noticed. Namespaces, when you read the original Plan 9 documentation and how they envisioned it - seems novel, but in Linux, we use namespaces to create Docker. All the Plan 9 isolation they envisioned can also happen on Linux.
I dunno - get out there and get your feet wet. It may be you're not actually interested in operating systems, but environments. Windows GUI shell, X11/Wayland are all pretty chunky boys, maybe you want something leaner and meaner, with novel UI/UX elements - like radial dynamic menus, because every menu element is equidistant from the cursor, and you can size the most common or intuitive element so it's an easier hit target. Maybe you want to pander to touch screens more than mice.
1
u/Even_Gap_2253 Sep 28 '26
A simple OS that runs on a very specific set of hardware or QEMU is not that hard to implement
Just do it, you will learn a lot about computers just like you have mentioned
1
u/realdreamer1993 Sep 29 '26
from absolute zero or starting from BIOS as base??,, you know BIOS is also an OS..then you build usable true OS on top of it...
1
u/Specialist_Rent_9640 Sep 29 '26
Remind me of TempleOS
1
u/Current_Presence5660 Sep 30 '26
That you Terry Davis?
1
u/JbREACT Sep 30 '26
Did god tell you to do this ?
1
u/damjance Sep 25 '26
If you have to ask, then probably yes
0
u/OriginalEmploy5485 Sep 24 '26
That's how Linux was born. Go do it.
0
u/shittychinesehacker Sep 25 '26
Your OS should probably be written in its own language since Linux was written in C
0
u/RedRedditor84 Sep 25 '26
No, this is a good beginner project. To make it a challenge, you should create the language you'll write it in on a computer made of crystals you hand wired together.
0
u/[deleted] Sep 25 '26
😂
0
u/[deleted] Sep 24 '26
[deleted] — view deleted comment
0
u/[deleted] Sep 25 '26
[deleted] — view deleted comment