Latest Post

6/recent/ticker-posts

How Can I Create An Operating System?

I tried to give a quick outline of how to write your own operating system. I could give more details, but it is better if you explore and learn on your own after receiving a starting point. There are several other points that I think I should mention (especially in relation to which platform to build and how), but if you start with what I mentioned in my points above, you will find out for yourself.

How can I create an operating system?

The development of the operating system is not for everyone and it is a very difficult and unique task. You will encounter many obstacles on the way. Be confident, be curious, be dedicated, be willing to learn and keep an open mind, and you will cross them.

1) OS Concepts

First of all, and this is the most important thing, you must be very good with the concepts of your operating system. This is not a normal application that you will code, but the backbone of any computer. There can be no compromises and you cannot afford to be slippery. You must clearly know what you are doing, why you are doing it and how it will affect the system. Choose a good book on operating system theory - there are several and you will find them easily with a Google search.

2) Fundamentals

The operating systems are written mainly in C, many of them in assembly and some in C ++. While no one can be a complete C expert, you need to be clear about its fundamentals, its syntax, how C code is compiled and executed, and how it interacts with the operating system. Choose a good book on Unix programming that explains the interaction of C code and the kernel. Also, be very familiar with the tips - you will need them very often.

3) Assembly Programming

Then next the assembly. I started writing my own bootloader. It is a step that many do not perform, as many bootloaders are readily available. But I wanted to do that anyway. Writing a bootloader and the initial parts of a kernel requires very good knowledge of assembly programming. This includes 8086 as a destination (since you'll have to work in real mode) and 386+ processors (for protected mode).

Read Also: How do I get the best Web Hosting?  

4) An Additional And Very Important Point

Learning to write your own bootloader is a very satisfying experience. It provides knowledge of the lowest levels of computer software and how it interacts with the hardware in a way that is a very difficult (if not impossible) task when working with other components. How a computer boots, how the first instruction is executed, what happens inside the CPU during these early stages, how an operating system is researched, how it is loaded - these are lessons that will give you knowledge that most people don't have that will be very useful for you in the future. Not just to write the kernel, but to understand how a computer works at the lowest level. IMO, this is something that every computer programmer should know (at least the basics). It seems very difficult at first, but when it becomes clear, it feels so good!

5) Concepts of Process

You will find many new words and concepts in this process. If they seem remotely related to what you're doing, read about them. I spent almost a week understanding the A20 - from the old mailing lists to the Wikipedia article. It is actually a small thing, but I wanted enough knowledge about it, and not something incomplete. Anything new you find, search Google and read until you think you can easily explain it to a newbie or help someone who has a problem with it.

(Operating systems have been around for a long, long time. Many have been developed in many different ways. You can imagine the complexity of their evolution and all the new things that have emerged as part of that evolution.)

6) The Various Networks And Their Channels

If you are not familiar with IRC, familiarize yourself with it - Internet Relay Chat, and about the various networks and their channels. For any kind of quick reference, see this page - http://www.osdev.org. Join your forum and IRC channel. There is nothing like interacting with people who have been really involved in developing operating systems for years - learn from their experiences, ask questions and become your friend. This is a great way to increase your own knowledge and experience.

7) Google and Stack Overflow

Google and Stack Overflow are your best friends, in addition to OSDev. Use them. Search, ask questions, get in touch with people. Don't give up if you have a difficult problem. Stay with it, debug it, investigate it. There is always a solution. And each solution you may find on your own is a powerful addition to your kernel.

And that brings me to my last point. You will have to learn many tools - especially assemblers (preferably The Netwide Assembler: NASM) and GDB: The GNU Project Debugger. Gdb is very, very important, so work with it as much as you can. In addition, you will need to familiarize yourself with the various Linux tools and utilities. You will find out when you start writing the kernel.

Post a Comment

0 Comments