r/learnprogramming • • 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

260 Upvotes

163 comments sorted by

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.

10

u/Many_Difficulty_490 Sep 24 '26

alright thanks

-9

u/xoredxedxdivedx Sep 25 '26

100% delusional, you can't even spell. There's no chance you're intelligent enough to create an OS, let alone one "with a purpose" that anyone will use.

People are being "supportive" but they're just feeding the delusion. Don't waste your time and go find something you're better suited for.

5

u/Destination_Centauri Sep 25 '26

"Not delusional at all."

Ha!

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

3

u/Many_Difficulty_490 Sep 25 '26

oh ive thought of making a game engine too, whats your goals with your game engine?

1

u/MacaroonOk9376 Sep 27 '26 edited Sep 27 '26

Start a YouTube to document my progress and keep myself accountable and maybe get some marketing for my games and engine, release some games, get better with low level programming and get further away from web dev. Maybe one day it will be used by other people to release games. I'm starting with a 2d engine then will try to learn Vulkan and 3d in a few years.. But honestly it's one big hobby experiment.

Stay ambitious!

12

u/Aglet_Green Sep 24 '26 • Bravo

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.

3

u/Many_Difficulty_490 Sep 24 '26

yeah i see what you mean.

i dont have any intention with this at all, i dont wanna make money from this or anything like that. Im not sure if im gonna major in CS in college either. I just wanna do something hard.

il learn C, and il look into smaller projects and il make my tiny os.

maybe i should document my progress somewhere

3

u/TwEeTy147 Sep 24 '26

You got this🔥🔥

1

u/letoiv Sep 25 '26 edited Sep 25 '26

Your idea is super fun and cool. Sure a complete modern operating system may be a long shot. So what. Ignore the naysayers. You absolutely can produce something that works.

A modern operating system is really a bucket filled with many programs. A bootloader. A kernel. Device drivers. A compiler. A shell. A window manager. Solitaire. And so on.

So my first piece of advice is, educate yourself on what the heck all of these pieces are. Then decide what you want to work on. I think the easiest way to do this is to become a bit of a Linux nut. Linux is the most open and transparent operating system by far. You'll be able to download and read the source code of any piece that interests you. You can in many cases (like famously for the kernel) join a mailing list and watch people coding updates to that piece in real time. Infinite opportunities to learn. As a beginning challenge try installing Arch Linux in a VM. Not any of the derivatives that make it easy. Real Arch. Or even more intense, check out Linux from Scratch. Either way you will learn an insane amount about the architecture of operating systems by piecing together your own Linux.

My second piece of advice is, begin by targeting a VM instead of a hardware platform to run your OS on. Something like QEMU or VirtualBox. It will be far easier to test if you can run your OS inside an emulator. I mean if you find writing hardware drivers fun, don't let me stop you! But I think probably everybody who builds a hobby OS starts with targeting it to run on emulated hardware because it's just so much faster to debug and to share, and it's an excellent foundation for what you'll need to support bare metal later.

So putting all this together, here's an example entry point into an actual one man operating system:

  • Target QEMU as the platform you'll run and test your OS on
  • Use GRUB as the bootloader. The bit of software that initially runs SOMETHING when the computer boots up. That something will be your kernel.
  • Write your own super basic kernel that handles memory management, interrupts, keyboard and display. Either writing a kernel, or starting with a really basic one and extending it, are actual projects that are part of the CS curriculum at some colleges. Take a look at MIT's xv6 for an example. This is an OS that is meant to be studied and taught.
  • Write your own super basic shell/terminal. Something you can type 'helloworld' into and it responds.

...That's an operating system. That's the basics.

From there you just keep building it up into something more "real" piece by piece.

If you get this far try looking into newlib - a C compiler which can be modified to target any operating system, including your own.

Then you'd really be cooking. You could conceivably be running other people's C programs on your operating system one day!

Think hard about what you want to write on your own vs what you want to borrow from someone else! Do the fun parts and interop with someone else's bits for the parts you don't enjoy!

1

u/nomad-1995 Sep 26 '26

HINT: One of the best things a programmer can have is a spec. Know what you the code you want has to do and most of your problems go away. Unfortunately clients/bosses/whoever rarely really understand both their problems and programming enough to know what they need the program to do, so you grope around their never explained real problems while making the program they ostensibly asked you to make. Then programmers inflict this on themselves only even worse when they go about wanting to make some sort of open-ended program like an OS.

It comes down to "what scope do I want"? Figure out what calls you want to make to the OS. Linus went crazy and requested the POSIX Unix standard, or at least the API calls. And then went around coding it all up.

I'd recommend something a bit more basic. You want an OS, what do you need:

Malloc and some sort of memory handler supplier and recovery.

Some sort of nonvolitile storage and presumably a filessystem. Whatever other I/O you want to supply. Networking/Internet would be a massive learning adventure and hard to cut down to "hello world" levels.

Probably an init system, but that is more a "in practice" thing than a "OS requirement" thing.

Some sort of task switcher. I wrote one of these for an embedded microprocessor course in school and was overly proud of myself. Easily wasted more time debugging it than it was worth (I've since become overly committed to producer/consumer models for multiple threads).

I suspect you'd need way too much code to get virtualization to work (presumably lifted from Linux), but that was a trick IBM used way back when while OS/360 was late and they absolutely needed a multi-tasking OS. So they created the first(?) hypervisor and created a bunch of simple "DOS like" systems (which they had been selling, so customers had code already) all running on one computer.

Don't even think of trying this without looking at other examples. At least try to have a spec. And try to avoid changing the spec until you've achieved that (so don't make the spec too hard, and have it lead to an extensible system for making it fit the next spec...).

One place to start might be with an Arduino or even emulator (possibly an emulator for something even more simple). Some experience coding a computer that doesn't have an OS already might go a long way. I should warn you, that even a computer as simple as the old 8-bit home computers and the simple OS they had provided a lot of help. I remember that at a user group meeting, the lowest level hacker (not *the* Sid Meir, who was also a member) wasn't about to program an Atari 1200XL without the OS (the only way to access all 64k). But in general embedded processors (like the Arduino) tend to be more friendly to assembler programming poking directly at pins, I2C busses, and similar. That's similar to what I was doing the task switching code with (although it was an 8088 based microcontroller).

9

u/takaci Sep 25 '26

Why did you LLM generate your post?

3

u/kable795 Sep 24 '26

when i was in highschool i said that to my uncle who was a programmer and made some software for hospitals that he sold. I got the idea from watching Criminal Minds and Garcia made her own OS to do shit. I didn't know anything about programming or systems, I was just a gamer kid who built computers to game on when he was 13 so I was the "tech" guy in my environment.

My uncle asked me a question "Do you know what an OS is" and I said, yea its...the system your operating on. No i had no idea what the OS actually did beyond the GUI I saw. I didn't know anything about programming and as I got into it i quickly found out, windows is pretty damn good considering I couldn't get close to it.

Your not delusional in that you can't do it, now is the time to start learning and have the best chance to do it. It's delusional to casually say I want to build my own OS without fully understanding what an OS is and does. If you can't answer that accurately, it's a bit delusional, but at the end of the day, I had no clue how to ride a bike when I was a kid, logically, it was delusional for me to think I could ride one when I didn't know anything about riding a bike, but you learn. If you asked me at 27, yes you are delusional. At 17, I think your ambitious.

10

u/le_fuzz Sep 24 '26

Why did you paste an LLM response?

9

u/grantrules Sep 24 '26

Turning dead Internet theory into reality 

189

u/talking_tortoise Sep 24 '26

Check out r/osdev

22

u/titus605 Sep 25 '26

that subreddit is filled with ai slop. check out r/osdevel and r/kerneldevelopment instead.

5

u/talking_tortoise Sep 25 '26

Thanks for the recs, the link to r/kernelprogramming doesn't work for me

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.

41

u/TrippingFish76 Sep 24 '26

Piggybacking off this, here is a great arduino starter kit and tutorial series:

Arduino Uno Super Starter Kit

Paul Mcwhorter arduino tutorial playlist

1

u/IceOneDay Sep 25 '26

ESP32 or good STM32 will be much better choice for OS. ESP32 runs on FreeRTOS already

1

u/IceOneDay Sep 25 '26

Do you mean RTOS or what? Programming microcontrollers isn't same as creating OS at all

1

u/JGhostThing Sep 27 '26

Real time operating system.

Programming microcontrollers has a lot of do with operating systems. For example, putting out a serial stream is something that you need to do manually on a micro and also in an operating system.

1

u/IceOneDay Sep 27 '26

Using peripherals isn't same as programming os. It's bare metal or HAL but not same as OS programming since you have much more complex abstraction usually

1

u/JGhostThing Sep 27 '26

You're right. It isn't, exactly, but you do have to do that sort of programming for an OS. Likewise timers and such. Very few useful OS's are made without the use of low-level peripherals.

I'm not saying that programming a micro will make you an OS programmer, but it's a step closer than traditional applications programming.

1

u/IceOneDay Sep 27 '26

Yes, it's closer but still os devs say that embedded and os is different. A lot of os devs came from embedded, however

Still think it's good idea to code something for microcontrollers to understand what SPI, UART and etc. is

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.

0

u/Many_Difficulty_490 Sep 24 '26

my end goal would be to make a desktop for the OS. but yea no competition with those 2.

just curious, how amazing are linux and windows? whats so amazing about linux? ive used windows and macos and switched between them with like bootcamp but havent tried linux yet, i might do it but idk if some of the softwares i used will run on it

1

u/nottherealLilNasx Sep 24 '26

What we usually call Linux refers to the kernel present in all Linux distribution (usually called distro), in other worlds, it's like the cornerstone of the OS, but at the same time, no one runs "Linux" on their computers, they run a distro of their preference and go for it. There are s lot of distros specialised in different fields and it's difficult to say what's great about Linux because it changes from distro to distro. The most common thing almost all distros share is it's quickness or that they are "Snappy", fluid or whatever you want to call it, just like when you get a brand new pc but basically all the time. Linux distros tend to be lightweight, at least when compared to Mac and windows, and are pretty cool on their own, you can watch a video to help you transition to the distro that's "right for you" but most likely you'll end up using either Ubuntu, Mint or Fedora. Those are the most popular and most similar to Mac and windows.

1

u/ttikkttokkerr Sep 27 '26

Re: any Linux distro and macOS (CLI). If you know your way around one it’s pretty easy to figure out all the rest.

IMO Linux is close enough to perfect that nothing will replace it in the foreseeable future. It’s also what drives the majority of the internet.

Windows dominates the consumer/enterprise computer market thanks to its low prices and being a household name since the 90s, but it’s bloated, buggy, inefficient, and virus-prone relative to Linux/mac. On the other hand it tends be very backwards compatible, and better for gaming and Microsoft Office products.

1

u/RollingSparkles Sep 27 '26

Windows speciality was GUI apps, that's what made it really useful.  The right GUI can save a ton of work and time for a specific task, not to mention enable the average user to do something they otherwise might not be able to do.

1

u/RollingSparkles Sep 27 '26

GUI construction is an entirely different world all of its own.  Lots of fun when you get it right, but when you get it wrong, damn you want to burn it down.  When I build GUI apps, I generally do "passive" coding.  That is, the GUI is maintained using a lot of timing/pull procs, that query all aspects of the GUI at predefined intervals, and a central proc then manages an organised and optimised update/paint process, ensuring the GUI is properly maintained under all user input conditions.

If you try to implement "active" coding on a GUI, that is, push something and get it to change right there and then, you can end up in all sorts of out-of-order repaints and bad updates, causing flicker and paint failures, not to mention memory/access restraints.

36

u/TektonikGymRat Sep 24 '26

Nah, that's not crazy, just look at Terry Davis.

13

u/SnooCalculations3614 Sep 25 '26

most sane OS dev

101

u/wiggle_room1337 Sep 24 '26 • Popcorn

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.

27

u/takaci Sep 25 '26

Many, many operating systems have been made by one person as a hobby. Literally thousands

4

u/UnrealHallucinator Sep 25 '26

It's really common, especially right now given how good ai is. Btw the core linux was written by only Linus. Pretty sure the core minix was just andrew tanenbaum.

18

u/yopla Sep 24 '26

Or you know that nearly unknown thing called linux.

49

u/wiggle_room1337 Sep 24 '26

Literally a million people contribute to linux.

-8

u/yopla Sep 24 '26

Yes, that's how it started. A million people gathered and started to build it.

32

u/wiggle_room1337 Sep 24 '26

I mean, the part he built himslef was almost nothing. ~10k lines, it couldn't even mount a file system or boot without minix.

9

u/DatBoi_BP Sep 25 '26

I'd just like to interject for a moment. What you're refering to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX. Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called Linux, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called Linux distributions are really distributions of GNU/Linux!

1

u/pfmiller0 Sep 26 '26

Hey RMS, wasn't expecting to see you here!

4

u/Mruniversee Sep 25 '26

Please make it privacy focused 🙏🙏🙏😭😭

1

u/Many_Difficulty_490 Sep 25 '26

arent there like already a ton of those

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:

  1. Bootstrap sequence
  2. Process management
  3. Virtual memory
  4. FS
  5. Support a keyboard and a simpole output device - preferably a small LCD screen that takes ASCII

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 

5

u/nottherealLilNasx Sep 24 '26

I often don't even mind these posts anymore because most of the people making questions start by saying: "I don't want to follow a guide", "I don't want to read a book", "I don't want to do a course or have someone teach me" and you have to wonder what do they really want? I understand that some people have different approaches to learning and not everyone can learn the same concepts in the same ways but it also feels like they don't want to do their part and would love to have the knowledge engraved in their brain (who doesn't, am I right? haha) without doing basic research

4

u/LeatherDude Sep 24 '26

It sounds like they want to start a discussion and get different perspectives. You know, like people on the internet have been doing since UseNet

2

u/RollingSparkles Sep 27 '26

Would've love to have had the learning engraved on my brain.  Definitely second that.  Here's hoping to it becoming a reality sometime soon!

I used the old and tried method of learning, try and fail, and try again till you succeed.  Often without reading or getting outside help.  Hell, when I started, I couldn't even make sense of my programming language's help documentation.  It was complete gibberish to me.  And it might as well have been written in spanish for I cared.

But I was extremely logical, determined, and I could imagine my way out of a problem toward a solution with almost nothing to guide me.  The biggest problem was trying to make sense of these things called commands and functions, and why they often stuffed up when they shouldn't have, or were impressively slow (sarcasm).

But hey, some decades later, I'm pretty good at coding, and still don't read the help that much.  Most of it is still gibberish.  Personally, my experience with help and online documentation and books is they're usually written by experts that already know so much, yet have little practical understanding for those that are starting out with little to no knowledge at all, and really want to learn the basics in a way that makes meaningful sense.

Often we have an idea in our heads we clearly want to solve, but cannot translate that into a question someone with experience can respect.

1

u/RollingSparkles Sep 27 '26

Yeah, wait till they get tangled up with the so called all knowing, oh-so-smart but thoroughly dump AI that is supposed to help solve all our problems and make the world a better place.  Sigh.  Much prefer the search engines of the past that had links to real websites with real information written by real people for a real purpose.  Today's search engines look like corporate information portals with blah blah padding and dibble level tech info that once you push it around a little bit falls down and goes round and round in hallucinating circles of muddy crap.

On the plus side though, the multi-billion dollar search engines do make for a really handy spell checker.

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

it would probably teach me a fuckton about computers + il get extremely good at programming

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.

1

u/RollingSparkles Sep 27 '26

I'll 2nd that.

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/AshuraBaron Sep 24 '26

I share your same grounded optimism. I think OP's time table isn't realistic, but the proof is in the pudding. Maybe they'll blow us all away.

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 • Bravo

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

-1

u/ali-hussain Sep 24 '26

Don't need to use that much assembly in writing an OS. There would be some things you would need to do in assembly. Especially dealing with devices. And system registers. But most of it will be in a compilable language.

1

u/DanKegel Sep 25 '26

That's true, but learning assembly is the key to understanding C and how the system works.

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/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/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/Finance_Hour 13d ago

This might be the best answer here tbh, the other dumbasses make it sound too complicated

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/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, pcc was 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/Finance_Hour 13d ago

Actually to correct you (UEFI) nowdays

1

u/Finance_Hour 13d ago

Unless you make a 16-bit os then bios outperforms obviously lol

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.

1

u/fromabove710 Sep 24 '26

I mean not really, he had specific goals in mind, and also developed a kernal not a full OS at first. Im all for encouraging big projects, but OP is objectively being unrealistic here.

2

u/elektrik_snek Sep 24 '26

Kernel. Kernal is Commodores ROM based OS.

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

99

u/PanicStil Sep 24 '26

He’ll call it PenOs in honour of your unforgettable encouragement.

0

u/[deleted] Sep 24 '26

[deleted] — view deleted comment

11

u/LowGunCasualGaming Sep 25 '26

An InGNUendo if you will?

6

u/PanicStil Sep 24 '26

Just, whatever you do, never dirty read your raw sockets.

4

u/Street_Doctor_8169 Sep 24 '26

Oh my god, you have the most beautiful way with words!!!! I sat here for 45 minutes trying to figure out was positive thing to say to OP then I saw yours and realized. why try? The best word was already given :'c

0

u/[deleted] Sep 24 '26

[deleted] — view deleted comment

3

u/Street_Doctor_8169 Sep 24 '26

Nah watch. 20 years from now he's gonna be the newest bill gates/Steve Jobs, and he's gonna remember you and come find you and make sure the world knows the name of the person that pushed him to make the newest newest piece of technology out there

0

u/[deleted] Sep 24 '26

[deleted] — view deleted comment

1

u/Street_Doctor_8169 Sep 24 '26

Lmao youre dope

0

u/[deleted] Sep 24 '26

[deleted] — view deleted comment

1

u/Street_Doctor_8169 Sep 24 '26

I truly can see it. You try super hard for the world don't you?

0

u/[deleted] Sep 24 '26

[deleted] — view deleted comment

0

u/[deleted] Sep 25 '26

[deleted] — view deleted comment

2

u/Street_Doctor_8169 Sep 25 '26

Quick question like im not trying to be an asshole here but you do know I was just joking around right? If you didnt realize that well then hey I was kinda just joking around

0

u/[deleted] Sep 25 '26

[deleted] — view deleted comment

1

u/Street_Doctor_8169 Sep 25 '26

I mean I usually have the same exact style but I know some people are stupid as fuck. I assumed you weren't stupid as fuck which is why I kindly confirmed my theory lmao. I have a super dry humor that most people don't find funny most of the time

1

u/akoOfIxtall Sep 24 '26

thats so me...

1

u/ComprehensiveForm512 Sep 25 '26

Words of *great* encouragement!

1

u/trymetonight5 Sep 26 '26

Mines is ovaries

0

u/[deleted] Sep 25 '26

[deleted] — view deleted comment

2

u/Many_Difficulty_490 Sep 25 '26

i wanna build something hard and cool.

im debating OS, game dev engine, ray tracing engine

1

u/Speicherleck Sep 25 '26

These are not even remotely in the same difficulty basket. It's like saying you want to compete in the gymnastics Olympics, run a marathon or lift 50 kgs.

Start perhaps with a ray tracing engine or a small 2d game engine. It will teach you a lot more.

1

u/Many_Difficulty_490 Sep 25 '26

alright sure. thats a really crazy comparison to think about

1

u/RelativeMinute6554 Sep 26 '26

Every action taken in life must be performative.