Creating an OS from scratch.. (Please help guys...)
-
- Posts: 4
- Joined: Sat Aug 14, 2010 12:28 pm
Creating an OS from scratch.. (Please help guys...)
Hello everyone...
I am a final year, CS student. And want to make an OS as my final year project.
I dont want to make avery hi-fi one!!
I would be very glad, if anyone cud suggest me--
1) how to navigate through the Development
2) right tools for development
3) from where to learn the C coding for H/W
4) anything u feel is quite important...
I would be highly obliged to receive ur help...!!!
------ WAITING FOR RESPONSE ---------
I am a final year, CS student. And want to make an OS as my final year project.
I dont want to make avery hi-fi one!!
I would be very glad, if anyone cud suggest me--
1) how to navigate through the Development
2) right tools for development
3) from where to learn the C coding for H/W
4) anything u feel is quite important...
I would be highly obliged to receive ur help...!!!
------ WAITING FOR RESPONSE ---------
- Combuster
- 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: Creating an OS from scratch.. (Please help guys...)
http://wiki.osdev.org/Beginner_Mistakes#Deadlines (and for the rest of your questions, the entire rest of the wiki)4) anything u feel is quite important...
But since you don't know C (and probably no assembly either), I would seriously recommend contacting your professor for a different assignment. At least over here, getting the relevant programming knowledge takes two full courses, leaving you with 4 months to write the OS before summer holidays start again.
Re: Creating an OS from scratch.. (Please help guys...)
Learn C/asm fairly good, then I'd recommend getting Andrew Tanenbaum's book (Which does a fairly good job of covering theory in-practice), and read the tutorials on the inter-webs (which do a good job of showing how). If you don't know C/asm at all, and especially if you learned how to program in college, it might be a good idea to take on a less ambitious project, just IMHO.
In my opinion, whenever you don't know where to start on a project, you should probably do some serious studying before you decide to commit to it.
In my opinion, whenever you don't know where to start on a project, you should probably do some serious studying before you decide to commit to it.
Last edited by MDM on Sat Aug 14, 2010 5:23 pm, edited 1 time in total.
Re: Creating an OS from scratch.. (Please help guys...)
What languages do you know? C isn't necessarily required. A small amount of asm is(IMO, basic/simple asm is easy to learn.) It'd be interesting to see an OS attempted in some language other than C and asm. Although, interesting doesn't always equate to fruitful.
IMHO, this is a bad idea, and could possibly end with you not having a complete or even nearly complete project to turn in when it's all said and done. OS(kernel) developing is a fun hobby, but I'd hate it as a responsibility.
IMHO, this is a bad idea, and could possibly end with you not having a complete or even nearly complete project to turn in when it's all said and done. OS(kernel) developing is a fun hobby, but I'd hate it as a responsibility.
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Re: Creating an OS from scratch.. (Please help guys...)
Seriously? Please don't include something like that, its obvious that you are, theres no need to state it.------ WAITING FOR RESPONSE ---------
#1: Don't. We don't need to help you navigate through development because honestly you shouldn't be doing this. While C is not requires it is highly recommended since most tutorials/documents are written in C or with C in mind. You could write an OS in another language, but you will still need to learn assembly, which to learn well is an undertaking on its own.
#2: The right tools. Figure out the language to use first. Then look on the wiki.
#3: As I said and others have said, you don't need C. Though you will probably want to know it.
#4: Basically what you're looking at: You must learn how to program in at least assembly. Then you must become very good at it. Then you must learn how the low-level parts of the computer operate, and learn about architecture specific operations. Once this is complete, you must start making the OS, which is already damn hard even in C. Then you must make it work well (MMU, Multitasking, FS's, hardware, UI, etc).
Of course, the feasibility much depends on what you know - what languages do you know, and how much about the computer's operations do you know?
My advice: Try an easier project.
I know that I'm just reiterating what others have already said, but I felt like I wanted to post this anyway.
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Re: Creating an OS from scratch.. (Please help guys...)
Well as many others said before you have to know at least 1 language very well. Some asm knowledge is also necessary, but I think you don't have to be a good asm programmer to develop your own OS.
But I DON'T think that C is really necessary. You should be able to read some C Code, because many example codes are written in C. For example my OS doesn't contain a single line of C-Code. It's written in Pascal and some asm.
But I DON'T think that C is really necessary. You should be able to read some C Code, because many example codes are written in C. For example my OS doesn't contain a single line of C-Code. It's written in Pascal and some asm.
Re: Creating an OS from scratch.. (Please help guys...)
C isn't necessary, I agree. But in 99 cases out of 100, not having a firm grasp of C is a sign of a more severe underlying problem - that the person in question has little or no experience programming close to the machine.
You usually get that symptom from people who, so far, wrote code in Java, PHP, VB, JavaScript, or something like that.
While you don't need C experience per se to write an OS, you need experience twiddling bits and bytes around. And the aforementioned languages usually don't give you that (exceptional examples of the contrary nonwithstanding).
And with that kind of background, trying to write an OS in a language other than C will make things harder on the person than just outright learning the language C would be.
IMHO.
You usually get that symptom from people who, so far, wrote code in Java, PHP, VB, JavaScript, or something like that.
While you don't need C experience per se to write an OS, you need experience twiddling bits and bytes around. And the aforementioned languages usually don't give you that (exceptional examples of the contrary nonwithstanding).
And with that kind of background, trying to write an OS in a language other than C will make things harder on the person than just outright learning the language C would be.
IMHO.
Every good solution is obvious once you've found it.
Re: Creating an OS from scratch.. (Please help guys...)
Well seeing as you don't want a fancy OS and don't know C, you can probably cobble together the "For the starter" items on this page http://wiki.osdev.org/What_order_should ... ings_in%3F in about 3-4 months.
As far as tools go, I'd recommend:
As far as tools go, I'd recommend:
- Firefox
Netwide Assembler (NASM) - You really, really need to know x86 assembly. Even if you're using C, you still need it for some functions and for debugging.
GCC and binutils (cygwin on windows) - For compiling and debugging
and a few boxes of tissues for when you're up at 2 AM crying about how you can't get interrupts working
-
- Posts: 4
- Joined: Sat Aug 14, 2010 12:28 pm
Re: Creating an OS from scratch.. (Please help guys...)
piranha wrote: #4: Basically what you're looking at: You must learn how to program in at least assembly. Then you must become very good at it. Then you must learn how the low-level parts of the computer operate, and learn about architecture specific operations. Once this is complete, you must start making the OS, which is already damn hard even in C. Then you must make it work well (MMU, Multitasking, FS's, hardware, UI, etc).
-JL
I am very grateful to u, bro...
Thanks..!!
Yaa....
I am looking out for-
'Then you must learn how the low-level parts of the computer operate, and learn about architecture specific operations. Once this is complete, you must start making the OS, which is already damn hard even in C. Then you must make it work well (MMU, Multitasking, FS's, hardware, UI, etc).'
can u help me...??
-
- Posts: 4
- Joined: Sat Aug 14, 2010 12:28 pm
Re: Creating an OS from scratch.. (Please help guys...)
First of all I would like to thank, all my friends who have been so co-operative regarding my doubt clearance.
I think, it was my inexperience with forums, that I didn't mention my previous knowledge,
(I thought, saying 'Final Year Student' will be sufficient)
which I would like to clarify here---
#1 I have done a few small projects in C and data-structures.
#2 I have undergone assembly language coding (TASM).
#4 I had 'Computer Organization' and 'Advanced Computer Architecture' course at my Engineering course
#3 I have some experience working with RedHat.
My project status is---
I am developing everything using VMware in WinXp as my base OS.
#1 Installed RHEL 5
#2 using NASM in RHEL
#3 using virtual floppy, as my boot device
#4 a new virtual machine as my test machine
I have successfully booted my machine, using assembly codes....
Now I am interested in understanding how hardware can be controlled using C language...???
I think, it was my inexperience with forums, that I didn't mention my previous knowledge,
(I thought, saying 'Final Year Student' will be sufficient)
which I would like to clarify here---
#1 I have done a few small projects in C and data-structures.
#2 I have undergone assembly language coding (TASM).
#4 I had 'Computer Organization' and 'Advanced Computer Architecture' course at my Engineering course
#3 I have some experience working with RedHat.
My project status is---
I am developing everything using VMware in WinXp as my base OS.
#1 Installed RHEL 5
#2 using NASM in RHEL
#3 using virtual floppy, as my boot device
#4 a new virtual machine as my test machine
I have successfully booted my machine, using assembly codes....
Now I am interested in understanding how hardware can be controlled using C language...???
- Combuster
- 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: Creating an OS from scratch.. (Please help guys...)
Ooh, luxury.amiteshunique wrote:#4 I had 'Computer Organization' and 'Advanced Computer Architecture' course at my Engineering course
The only thing you'll have to realize is that pointers in C are just numbers with a different label. They point directly to an address in the system. So if you want to change a single byte, the only construction you need is *(unsigned char *)address = value; Anything larger than a byte takes the relevant space starting at the given address. Anything that's not part of the main address space (including I/O space) requires assembly.
Re: Creating an OS from scratch.. (Please help guys...)
Have you checked out the wiki. There's a lot information to get you started. On a PC you almost must use assembler (maybe inline) to access HW since the ports are either I/O mapped, or on the PCI bus (which in turn is configured via I/O mapped accesses).
-
- Posts: 4
- Joined: Sat Aug 14, 2010 12:28 pm
Re: Creating an OS from scratch.. (Please help guys...)
can u suggest me any tutorial,etc.
specific links for C coding for hardware control...???
specific links for C coding for hardware control...???
- Combuster
- 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: Creating an OS from scratch.. (Please help guys...)
Have you counted the number of references to the wiki? I found at least four separate ones on this page alone... (hint hint)
Re: Creating an OS from scratch.. (Please help guys...)
I don't think this is quite correct. Or if it is, it is a slight exaggeration.Solar wrote:C isn't necessary, I agree. But in 99 cases out of 100, not having a firm grasp of C is a sign of a more severe underlying problem - that the person in question has little or no experience programming close to the machine.
I used to mainly code in an old language called QBASIC.
Since I wanted to do highly graphical 3D stuff, I taught myself ASM to mix with QB. What I couldn't do in ASM I did in QB.
Gradually I got good at ASM, messing with hardware etc, on a very low-level.
Assembly is now my first language.
And I was a BASIC programmer, who still doesn't know C. Admittedly, however, I can sorta follow C code, because it is similar to pseudo code. I couldn't come up with it, but I can usually see what it is supposed to do. So as long as you think think in computer logic, not knowing C is by no means a problem.
David
President of the Useless OS project