How to make an operating system
A lot of computer scientists or engineers wish they could write their own operating system and have such interesting experience, but a lot of them choose wrong ways to do that. In this article, we count some wrong ways, then we tell you what’s the right way!
Wrong ways
- Making a Linux distribution :
This is what people do more than other ways, if you take a look at DistroWatch, you’ll find more than 1000 Linux distributions. Creating a Linux distribution is good, but when we want a working operating system with tools we need (e.g Kali Linux). Also, creating a distribution from scratch using LFS can show you how a Linux system is built, but it doesn’t show you how an operating system works.
- Making builds of existing operating systems :
This way is rare, but people do this to. This is just like making a Linux distribution, you never learn how that operating system works, you only learn how to build, and how to hack the existing operating system. Building FreeBSD is cool and easy. Also, you can hack it every time you like, but it doesn’t mean you understand what happens behind this operating system.
- Thinking all operating system shall have GUI :
This is the most dangerous thought about an operating system. Microsoft Windows or Ubuntu or Apple OS X are most usual operating systems. All of them contain GUI, but if you read their history, you’ll find all of them started with CLI (Command Line Interface), then the graphical interface added to them. Currently a lot of *nix operating systems like FreeBSD doesn’t contain GUI by default. So, you don’t need to think about GUI.
Right ways
- Reading operating system references :
This is the most important way in creating an operating system. Reading books, websites and other documents and references can help you find what an operating system is and how it works. Websites like OSDev are the best references, because they’re free, and have a good support on their forums and IRC channels.
- Learning useful programming languages :
A useful language in this case is the most suitable language for low-level programming. The most common languages in operating system development are C , Assembly, sometimes Go, and also in rare cases languages like Rust or Java.
- Studying other projects :
There are thousands of projects done before you. You need to believe this! You can start with simple operating system projects like BYOOS , my16bitkernel and MikeOS. These projects are written in pure assembly, and you can learn assembly by studying source codes of these projects. Then you need to study more complex projects like NanOS , to learn more. After studying these projects, you can join one of them and help them improve their projects, or you can fork them and do what you want. After hacking and creating simple projects, you can start studying bigger projects like Minix3.
Find your way
Now, you know where to start, we hope we could help you, and we hope you’ll find your way after reading this article.