Page 1 of 2
operating system projects..
Posted: Thu May 14, 2009 12:22 pm
by reavean
hi friends,
I am reavean,i am doing B TECH IT,i am interested in operating systems..so i want to do a project on operating systems in my next semester..I asked many friends and some stated to design a linux distro or a small OS on your own..but i think these project will be time consuming, cannot be finished within 6 or 8 months.. I am strong in c programming and operating system concepts.so i just want to know what kind of projects i can do related to OS and what should i study (subjects and books) for that..I am ready to do anything for that.thanks in advance guys..
Re: operating system projects..
Posted: Thu May 14, 2009 12:52 pm
by steveklabnik
You could always write a driver of some kind for an existing OS.
Re: operating system projects..
Posted: Thu May 14, 2009 10:54 pm
by salil_bhagurkar
I think many projects have a 'todo' list attached on their web pages. You could take up one of them.
You could even start of with the Bran's kernel development tutorial. That way you'll get a simple operating system to work on...
Re: operating system projects..
Posted: Fri May 15, 2009 2:20 am
by Combuster
salil_bhagurkar wrote:You could even start of with the Bran's kernel development tutorial.
The consensus is that basing your code off a tutorial is a Bad Idea(tm).
Given the amount of dead projects, randomly picking one is not a good idea either.
The suggestion to (re)write a driver for linux is a good idea given the timespan. If you are serious about writing an OS, you have to be careful with the goals - getting a shell running is difficult enough if you don't have the previous knowledge, but it can well be done in 6 months.
As for working on an existing OS, maybe poke the pedigree team. They are pretty active and unlike some others know what they are getting at.
Re: operating system projects..
Posted: Fri May 15, 2009 3:08 am
by salil_bhagurkar
Combuster wrote:salil_bhagurkar wrote:You could even start of with the Bran's kernel development tutorial.
The consensus is that basing your code off a tutorial is a Bad Idea(tm).
Given the amount of dead projects, randomly picking one is not a good idea either.
The suggestion to (re)write a driver for linux is a good idea given the timespan. If you are serious about writing an OS, you have to be careful with the goals - getting a shell running is difficult enough if you don't have the previous knowledge, but it can well be done in 6 months.
As for working on an existing OS, maybe poke the pedigree team. They are pretty active and unlike some others know what they are getting at.
Agreed. But I thought that since he has less time, its not worth doing it in a hurry. For making an OS it is really worth going through the path of making a 16 bit asm os, then a 32 bit asm os (screwing around with pmode) and then finally a C os. This really makes you learn and makes a good base of both motivation and knowledge for you.
Since it is not a hobby, but a project, I feel the approach should be different.
Re: operating system projects..
Posted: Fri May 15, 2009 6:47 am
by Love4Boobies
salil_bhagurkar wrote:For making an OS it is really worth going through the path of making a 16 bit asm os, then a 32 bit asm os (screwing around with pmode) and then finally a C os. This really makes you learn and makes a good base of both motivation and knowledge for you.
I disagree. Starting with a 16-bit OS won't help. Why would it? The real-address mode concepts are easy to grasp and pmode is not that difficult to use so it'd be a waste of time. At least in pmode you can actually learn a thing or two: paging and memory management in general, kernel designs and security, etc.
Re: operating system projects..
Posted: Fri May 15, 2009 6:54 am
by salil_bhagurkar
This is like the 'why to learn history' question.
I guess asm programming helps a lot before you start off with C. This is because it makes you understand what the C code is going to translate into. For example, if you know that there are two instructions called 'inc' and 'add' then you know that 'i++' will be better than 'i = i + 1' in high level code. After all, the port i/o is done in assembly.
Re: operating system projects..
Posted: Fri May 15, 2009 7:06 am
by JamesM
salil_bhagurkar wrote:This is like the 'why to learn history' question.
I guess asm programming helps a lot before you start off with C. This is because it makes you understand what the C code is going to translate into. For example, if you know that there are two instructions called 'inc' and 'add' then you know that 'i++' will be better than 'i = i + 1' in high level code. After all, the port i/o is done in assembly.
In which case, I suggest the opposite, because you should well know that "i++" is exactly equivalent to "i = i + 1" in high level code.
Remember that in a high level (imperative) language the code describes the
function of the program, in an imperative manner. It does not specify how that functionality is to be accomplished in machine code.
Personally I'd start with C and learn about assembly from a purely theoretical standpoint. The amount of it you need to use is negligible normally, and when you do need to use it, then is a great time to learn it.
Re: operating system projects..
Posted: Fri May 15, 2009 8:16 am
by Dex
You could, make a Dos clone (still usefull), i code MiniDos in less than a week and it can run many old dos games, edits, soon to have a fasm port etc.
So its more what your set your goals at, if you want to make a multitasking desktop with a cli, gui, etc, forget it ,in that time scale.
Re: operating system projects..
Posted: Fri May 15, 2009 8:42 am
by Troy Martin
I started 16-bit, went 32 for a while, and dropped back to real mode. I think it's because I'm lazy (which explains why a good 30KB of my source code is MikeOS code
)
Re: operating system projects..
Posted: Fri May 15, 2009 10:15 am
by salil_bhagurkar
Well it worked great for me 16asm->32asm->32C... I already knew C before. But once i did assembly i got a much more in-depth understanding of C. So I was marketing it..
May be theoretically the other way is correct.
Re: operating system projects..
Posted: Mon May 18, 2009 1:01 pm
by dude101
salil_bhagurkar wrote:This is like the 'why to learn history' question.
I guess asm programming helps a lot before you start off with C. This is because it makes you understand what the C code is going to translate into. For example, if you know that there are two instructions called 'inc' and 'add' then you know that 'i++' will be better than 'i = i + 1' in high level code. After all, the port i/o is done in assembly.
Ummm any decent compiler would use the most optimized instruction for either case.
Re: operating system projects..
Posted: Mon May 18, 2009 1:49 pm
by NickJohnson
Well, I think that was just an example. It's far more important to understand how the stack and registers work, both in terms of understanding how the C code really works and getting things to play nicely in an OS. If you don't understand how the stack works, even if you use almost no assembly, there is no way you can write any low level code well.
For example, my printk function uses a simple stack hack to read in variable arguments using only C:
Code: Select all
void printk(char *fmt, ...) {
printk_list(fmt, (u32int*) &fmt + 1);
}
Re: operating system projects..
Posted: Mon May 18, 2009 1:52 pm
by dude101
NickJohnson wrote:Well, I think that was just an example. It's far more important to understand how the stack and registers work, both in terms of understanding how the C code really works and getting things to play nicely in an OS. If you don't understand how the stack works, even if you use almost no assembly, there is no way you can write any low level code well.
For example, my printk function uses a simple stack hack to read in variable arguments using only C:
Code: Select all
void printk(char *fmt, ...) {
printk_list(fmt, (u32int*) &fmt + 1);
}
Oh don't get me wrong, I think understanding architecture and assembly are very very important. Thats why I hate that modern CS programs teach Java as the first language.
Re: operating system projects..
Posted: Mon May 18, 2009 2:07 pm
by Combuster
dude101 wrote:Oh don't get me wrong, I think understanding architecture and assembly are very very important. Thats why I hate that modern CS programs teach Java as the first language.
Thats why modern CS programs teach assembly as the
second language