operating system projects..

Programming, for all ages and all languages.
reavean
Posts: 2
Joined: Wed Feb 11, 2009 9:57 am

operating system projects..

Post 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.. :D
User avatar
steveklabnik
Member
Member
Posts: 72
Joined: Wed Jan 28, 2009 4:30 pm

Re: operating system projects..

Post by steveklabnik »

You could always write a driver of some kind for an existing OS.
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: operating system projects..

Post 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...
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: operating system projects..

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: operating system projects..

Post 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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: operating system projects..

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: operating system projects..

Post 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.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: operating system projects..

Post 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.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: operating system projects..

Post 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.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: operating system projects..

Post 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 :|)
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: operating system projects..

Post 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.. :D May be theoretically the other way is correct.
dude101
Member
Member
Posts: 56
Joined: Thu Apr 09, 2009 10:26 pm

Re: operating system projects..

Post 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.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: operating system projects..

Post 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);
}
dude101
Member
Member
Posts: 56
Joined: Thu Apr 09, 2009 10:26 pm

Re: operating system projects..

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: operating system projects..

Post 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 :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply