Page 1 of 1
Learned OS concepts in theory how to proceed next ?
Posted: Wed Oct 07, 2015 6:02 am
by manoj9372
Hi guys,
I am a newbie to this forum,first let me describe myself and then ill ask what i am tying to do
I am a network engg working in routing and switching technologies,I am B.TECH it graduate,I WANT to move in to network OS development . i.e i am trying to combine my profession with my interest,so i tough about how to give a transition from networker to a Network OS developer,so when i searched again how is this possible ? i asked my friend he said "you can go to network protocol testing so that it will be relevant to your job as well and you can get the touch of programming with out messing your carrier and once you are familiar with programming you can go to OS development".I agreed with him so i started to read the "Operating system concepts by abraham silberschatz",i already studied this paper in my engg days,but didn't paid much attention to it now i started to read the book again,basically i am not focusing the entire OS ,i am more interested in studying about the kernel,so i divided the topics i need to study in to 4 modules
1)process/thread management
2)file management
3)memory management
4)I/O management
I don't have c programming knowledge as well,so at first i am just reading the concepts of OS from this book and as well as notes from the internet,i am documenting in a simple manner which can i recap easily.BUT ONLY THEORY.
after reading the theory i found that i need to apply the concepts i studied ,so i again started to look for practical resources,
i found 2 types of suggestions from people
1) go with linux it is a major OS(we know it's importance as android,cisco routers,juniper routers,unix servers and most modern
OS were linux/unix based),but as it is a monolithic kernel,the code will be huge(i.e the number of lines)
2)some guys saying start with a micro-kernel OS ,so that you can understand the concepts easily in a simple manner,
what i have found out is a OS Called pint-OS it's kernel is just 6000 lines ,my heart is tempting to go for this,
my question is
1)which was i should choose a linux or any other smaller micro-kernel based OS like pint ?
2)i am thinking about learning programming on the way while learning about OS,(i.e learn by purpose)
As i already know the syntax of what is array,variable,function bla bla as i studied these in my IT
degree,but i don't have any APPLIED KNOWLEDGE.
will it work ?
am i on the right way ?
Kindly en light this newbie:)
NOTE:my area of interest is in understanding the core kernel,not about the debugging,n/w stack,device driver development,security,bug fixing etc..
Re: Learned OS concepts in theory how to proceed next ?
Posted: Thu Oct 08, 2015 9:49 am
by Muazzam
I know, I have no authority. That's why I quoted the official forum rules that are obviously not written by me. You're way senior member than I am, I trust you, and I publicly apologize. But I'm not quite sure he'll return to see see this.
Re: Learned OS concepts in theory how to proceed next ?
Posted: Fri Oct 09, 2015 1:47 am
by max
Hey manoj9372,
I'd like to apologize in the name of the OSDev community that you have not been welcomed here the way it should be. Some people on this forum just think that they are "better" than the rest of the programmer world, because they managed to get a basic kernel running (with more or rather less success).
So, welcome to the forum! I hope you enjoy your stay and have fun with your new, amazing hobby
About your questions. You seem to have a lot of knowledge about networking and stuff, but to apply this knowledge to code of some sort, it is essential to start learning to program first. You should invest some time to do the basics of C, learn how it works, and while you're there always keep an eye of what happens in the background and how the code that you write is actually translated and later executed by your CPU. Go deep into the details. By doing this, you'll already learn a lot of stuff that you'll need later (like, how does the heap/stack work, what's a byte order, and more).
Once you are at a stage that you feel you're ready, you should start writing your own kernel from scratch. As you said you don't want all that high-level stuff, and the basic kernel is just about the lowlevel stuff anyway, so just right for what you want. (You'll *need* debugging, though.) The learning curve seems overwhelming in the beginning, but don't worry - if you want it, you can do it. It is also not bad to take inspiration and learn from other hobby operating systems
out there, or even the big ones like Linux (it's harder to understand in most cases though).
Greets,
Max
Re: Learned OS concepts in theory how to proceed next ?
Posted: Fri Oct 09, 2015 5:46 am
by embryo2
manoj9372 wrote:1)which was i should choose a linux or any other smaller micro-kernel based OS like pint ?
I suppose first you should get acquainted with processor instructions and assembly language. Without understanding such stuff you won't be able to write key parts of a kernel.
manoj9372 wrote:2)i am thinking about learning programming on the way while learning about OS,(i.e learn by purpose)
As i already know the syntax of what is array,variable,function bla bla as i studied these in my IT degree,but i don't have any APPLIED KNOWLEDGE.
will it work ?
No. Processor first, assembly second, high level third.
manoj9372 wrote:am i on the right way ?
Yes and no. You can start from everything you think is attractive for you (to keep your motivation), but anyway the tasks a kernel should do require you to understand low level stuff. You can write some form of a high level kernel, but to make it working you need to catch the connection between the high level and what actually happens at the hardware level. Concept of a variable or an array don't hold anything about how a hardware can support such thing. So, no hardware can understand the variables or arrays. The job of an OSDever is to close the gap between the high level concepts and the hardware. If you don't know what should be in the between then there will be no OS. So, your goal is to catch the stuff between high level and hardware. For it to happen you should know how the hardware works. First and most important hardware on your way is a processor and memory. Learn about any processor and it's interaction with memory. Next learn how to order a processor to do what you want. The simplest way here is to learn assembly language. Any high level language involves some translator, which transforms the high level constructs into the processor instructions, so even if the high level looks simpler than assembly, it requires you to know the translation mechanism, which is essential for correct processor usage. The translation can be much more complex than the syntax of the assembly. That's why it is better to start with processor instructions and their representation in the form of an assembly code.
But when the high-low level link is understood it again becomes more efficient to use high level language instead of assembly.
I don't know what keeps your motivation, so I can suggest two directions for learning. First is to learn low level (assembly and hardware) and second is to learn the translation mechanism from high to low level. The latter way allows you to write high level programs and using them as an example to look deeper into the translation. But it can be slower than the former way because of the translation complexity involved.
manoj9372 wrote:my area of interest is in understanding the core kernel,not about the debugging,n/w stack,device driver development,security,bug fixing etc..
High level understanding is given to you in many articles on the web. So, I suppose you need not only the high level view, but also something practical that you can develop, try, change and enjoy. From low level perspective the bootloader is the simplest starting point you can play with. From high level perspective it is the language of your choice what can determine the starting point. If the language is important then you can try to find an OS in your language and to start doing something with it. If the high level language is not very important then there is another choice - you can learn C/C++ or you can learn even higher level language (like Java, for example). The C/C++ choice brings you to the world of a crowd where you can find many advices, but as is the case for any crowd there is also a lot of noise and bad practices (like the tricks the beginner OSDevers use). The higher level languages are not so crowded in the field of OSDeving and developers that use such languages mostly are not raw beginners. Also the higher level languages allow you to see more elegant architectural approach and so they can simplify your understanding of many OSDev related problems. My first shot was with Java and
here is the result you can see and may be play with.
Re: Learned OS concepts in theory how to proceed next ?
Posted: Mon Feb 15, 2016 9:15 pm
by manoj9372
Thanks max
As i said i got a job as network protocol tester,which involves little bit of scripting.
I decided to learn "c" and "Microprocessor and micro-controllers" with aurdino kit,(as per my friends advice)
one more question for you max,among the OS you listed
http://wiki.osdev.org/Projects
which is more suitable for a beginner like me? just need your word..
Thanks to embryo2,your answer inspire me to find what i was looking,Once again thanks everyone
Re: Learned OS concepts in theory how to proceed next ?
Posted: Mon Feb 15, 2016 10:31 pm
by apamment
hello!
I haven't read all this thread. but I must say, incase it hasn't already been said. a good way to start is do what everyone else does, and follow the tutorials. sure you'll end up with a cookie cutter barebones os, but as you add things to it, you'll start to realize the limitations. microkernel are a neat idea, and it's all good but at the end of the day, you want an os that works.
i guess what i am trying to say, is learn by doing. the amount of knowledge i have gained in the past few years for making an OS that isn't very good is very valuable. Sure it would have been nice to make an awesome OS from the get go, but, there are always going to be things you look back on and realize you could have done better.
Obviously the first thing to do is learn a programming language. It doesn't really matter which one, but preferably the one you plan to write an OS in. Once you have learned one, the rest come pretty easily. Unless it's python. I don't know who thought up that train wreck.
Anyway. So, follow the tutorials and experiment. i386 is what most of the tutorials are based around. yes it's out dated, but it's a pretty simple platform to start with.
Mostly, try to fix things yourself,obviously it's ok to ask questions when you're stumped, but there is nothing better than solving your own problems. you shout "YES!" and make your wife jump wondering what the commotion is. it's an invaluable experience.
finally, like max said, don't let anyone get you down. there are plenty of people out there who measure their knowlege by what they know and think they are smart than realize the vastness of what they don't know.
anyway i am keyboard happy. time to stop
andrew
Re: Learned OS concepts in theory how to proceed next ?
Posted: Wed Feb 17, 2016 4:47 am
by manoj9372
Thanks mate for your advice as you said i need strong base before writing an OS.
As i said i am going to learn hardware and "C" by programming aurdino,as per my knowledge/search/suggestions from friends is that it will suite my need and also will be practical.