|
How best could I learn to write my own OS? I'm 100% fluent in C, and I'd like to learn how to write an OS. Is there any resource (preferably free) that could help me write this stuff? I have a reasonably good idea of how kernels work, and I pretty much know what things I'd need to write (special kernel memory allocation functions, special printing functions, etc.) and I can tell you the difference between a microkernel and a monolithic kernel. How do I best go about learning this? |
|
For someone who is 100% fluent in C i find it surprising that you are asking such a question, a person who is that good at C obviously knows how to find information and apply it to what they are doing, and should know how a OS works and what an OS needs to do. However, knowing just C is simply not enough, you also should have a good understanding of assembly. the best free thing you can do is learn how other operating systems work, and the code behind them (did some one say download the linux kernel from kernel.org? hum i guess not), anyways i am interested in this too, which is why i am currently reading Understanding the Linux Kernel by Bovet and Cesati published by O'Reilly. I wish you the best of luck and hope you are successful. I have the Linux kernel, and a book on writing device drivers. The problem I have is understanding more than what the words mean. I want to see the function declarations for everything, which is simply not possible with the Linux kernel. I know 'hack' assembly, but I've always had trouble with mixing assembly and C, and I have no idea what to do with the stuff in between. Thus, I think that writing my own OS is the simplest possibility. then the short answer i can give you is your not ready yet |
Related Question: http://lockergnome.net/questions/63352/would-it-be-worth-on-making-a-new-os
I found out that you can't just write a OS in C you need to use a Assembly language which I can not find any tutorials on for more info check out my question here.
I'm not worried about Assembly. I know Hack assembly, and it won't take long to learn x86_64 Assembly from there. All I need to know are some new keywords and the registers. AX/BX/CX/DX/EX plus more is a bit different from A and D, but it won't be much of a problem.
HHBones - from your last response you obviously have not done that much assembly programming. for every assembly language you learn, its almost like starting all over again. You need to learn more then just keywords which are called op codes and directives, also the 80x86 throws you several curve balls it is not like a simple pic chip, you also have segmented addressing which is a pain, if you ask me and from my studies of the Linux kernel, it comes up a lot. you need to learn the architecture of what you are programming.