Should OS be written in C , C++ or Assembler?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Moose

RE:want to get some basic concepts clear?

Post by Moose »

Development for a good OS. What defines a good OS is a good start. Personally, a good OS would include a GUI but only because im too lazy to use command prompts. Even without a GUI your still looking at a good OS. Linux itself is used on servers without the GUI for improved performance and stability yet linux is still linux, losing the gui does not change anything. A good OS is really down to opinion but i think most people can agree, Windows is not a good OS. It might be getting there, but still.

Linux didn't take 10 years to make, its 10 years old to get were it is. An OS project is an ongoing project that never ends (much like all software but requires more maintenance attention).
It actually took linux torvalds 3 months to make a working version of linux that ran ontop of the minix filesystem setup he had. But that was very basic and before others joined and added mega improvements.

Yah, i installed Fedora Core 2. Released within this week (18th May). Good, failed the first install because of a bad cdr but good OS.
Has 2.6 kernel, selinux (though im yet to discover what exactly that is doing to my system).
It does have nasm with it but you can download an rpm from http://sourceforge.net/projects/nasm
Is it worth replacing RH9? If you get the updates yes. Redhat no long provide security updates for Redhat 9 anymore. Thats why i switched to fedora.
Fedora is actually just redhat 9 continued, its endorsed by redhat but developed by the open source community. Personally i see it as a cost cutting exercise for redhat but then thats me.
I do my OS dev work on FC2 now. Got nasm from sourceforge and vmware, ld was inside binutils which was already installed, same with mtools.

About myself,
Im an HND student of Lincoln College (www.lincolncollege.ac.uk), UK doing HND Computing with about 3-4 weeks left of the course. I have applied futher to Lincoln University to jump straight into the final third year of the computing degree there (but yet to receive my applicaion response, maybe they lost it :/).

I earn a crumby £4 wage at work doing weekends in -->Poundland Lincoln<-- :o.
Part of me actually wants to fail university application just so im forced to start looking for a real job.

Mainly when i leave uni (or college :s) i want to do software engineering. I thought about interests in networking since i think i understand it quite well after being taught so well by one of my favorite lecturers in college.

Moose
dany_gates_universal

RE:want to get some basic concepts clear?

Post by dany_gates_universal »

"Im an HND student of Lincoln College" what is HND? any special course?

abt XFS, it is distributed under GPL, so how can i include it in my OS. Because what if my OS is considered "Derivative Work" , i will have to license my OS also under GPL, which i don't wish to do:)    Or will i be able to use XFS and still can keep my OS proprietry just like MS! Is XFS well documented?
Moose

RE:want to get some basic concepts clear?

Post by Moose »

A hnd is higher education but not quite university degree level.

You could write a GPL driver to your os to use the xfs filesystem then leave your os proprietry.

I dont know how much documentation is available for xfs. Theres a website for it but i cant remember the address.

Moose
dany_gates_universal

RE:want to get some basic concepts clear?

Post by dany_gates_universal »

ok, all these days i was just gathering info abt the OS but i think its now time to start some coding! my vaccations are starting from tomorrow ,i am giving my last exam tomorrow so i have a lots of time free for OS dev, so tell me exactly from where should i start my OS, Boot loader?

other thing all these i was practising assembly on masm16 but i have decided to use nasm/yasm for my os dev ,so does nasm understand masm syntax? i will have to first learn nasm syntax and then start actual development,so where can i get some tutorials for starting coding in nasm?

Wow! i am getting Fedora Core2 tomorrow from my friend, are there any tips u would like to give me abt installation ,for Fedora as a whole?

Why they call it a "Core" , it is a desktop os like any other os, so why that core thing, why not just "Fedora"?
prabuinet

RE:want to get some basic concepts clear?

Post by prabuinet »

Hi, I found you two were in a long conversation , I think u will allow me to join with u, I read u were studying in MIT and interested in developing in an OS. Me me me tooo ... like to develop such great one. That's why every one are visiting this site. I'm not doing great study like you in MIT, i'm just studying B.Sc. computer science in a college near coimbatore(In India). But still I can help you...

I found u had planned to work in NASM. But my suggesstion is take "AS" assembler you can do anything with it , "I DID" yes i did a boot loader with "as", though it's syntax is little different from INTEL's it seems to be fine.

If u learn "as" and it's syntax it will also help you to write Inline Assembly easily. Yes will be able to write good stuff's of INLINE assembly if you planned to use GCC compiler.

I will give u example code's written to "AS" assembler if you request.
Yes i had coded in 'as', for boot loader, gdt, idt, ldt, paging(now).
why don't u try it.

but i'm surfing once in three days
so wait for two days if u r expecting anything from me.
dany_gates_universal

RE:want to get some basic concepts clear?

Post by dany_gates_universal »

hi, thanks a lot man! its not that we two of us are having any private discussion here, if that was the case we would have done the same in some private chat room, just joking:)
first of all u have got a total opposite image of mine,
i am not a good assembly programmer at all! all these days i have been programming in VC++ and .net C#, and just got introduced to assembly last year, basically i was into electronics all these days , but i dont know what struck me, i just wanted to code a OS!thats all:)
thanks for telling me abt AS assembler, but i dont know if i will be able to code in non-intel syntax, recently i have been studying to code with MASM(intel syntax) and some what with nasm(again intel syntax), but still i will give a look to AS!
since my geography is very bad , tell me where is "coimbatore",DONT LAUGH AT ME!

back to work, i want to develope OS for AMD64(futuristic approach) ,which does everything which any modern OS can do eg: win or linux. Should have a great great GUI and should be lightining fast (thats why i chose assembly and not C++ which was my first choice)!  i know EXTRA HIGH DREAMS , but i am doing what our Honorable President has asked every youth of this country to do , "Just Dream for big, and try to make it a reality" right!
So if  u are interested in helping me , reply me telling what are ur views abt My os, i mean what is ur definition of good OS!
Lastly its not that anybody is doing A GREAT STUDY HERE, it depends on how much knowledge u have abt the subject, many of my friends are doing B.Sc comp!
Well i am from Maharashtra,Pune. probably u r a south indian,i guess so.
sorry! i know i talk too much
see ya soon!
Moose

RE:want to get some basic concepts clear?

Post by Moose »

I did start by looking into the boot loader. Its how i started learning assembly. But after i learnt it, i still didnt know much about system level programming a computer itself so i skipped the bootloader by using grub and creating a multiboot kernel.
Now im going through the memory management setup procures. My heap setup routines need fine tuning and then the code that sets up page tables.

Nasm is easy, you dont need a tuturial. Just read through the nasm manual. It documents the syntax. Then you need the intel manuals 2a, 2b system instructions to use to decide what assembly instructions and their syntax to write the code you need.
The nasm manual can be found at http://sourceforge.net/projects/nasm

I have fedora 2. Yes its pretty cool, better than rh9. I think all of the admin tools are the same as rh9. In fact very little has changed from rh9 since it is a rh9 fork (probably rh11 if it were part of the redhat series, fodora 1 being rh10).

As for the core, i dont know. Im sure theres a paragraph given on the fedora web site (fedora.redhat.com).

Probably too late at time of writing but good luck in your exams.

Moose
dany_gates_universal

RE:want to get some basic concepts clear?

Post by dany_gates_universal »

hi, probably is should have posted the query below to redhat list , but anyways my prob is that at command prompt(terminal) in linux , how are we suppose to get one directory back using cd. Let me explain u:
Suppose i am in a dir "root" and i type:
root>cd dany
root/dany>cd cool
root/dany/cool>(so now i go in "cool" dir, if i want to go 1 dir back i.e to dany what command should i use?)in one book i read "cd.." will take me back one dir, but that doesn't happen(like we do it in good old windows:))
did u get my question? hope so!
abt fedora i installed core1, seems good but has some problems installing kernel sources, it is unable to install them from CD3!
Moose

RE:want to get some basic concepts clear?

Post by Moose »

Whats your error when you do 'cd ..'
Do you have the space?

Try 'cd /root/dany'

Fedora Core 1 i heard has cd problems with some of the packages. You should download core 2 anyway. Newer version and core 1 does not use 2.6 kernel.
The 2.6 kernel is a big improvement on the old 2.4. Loading Acrobat Reader for me for example took upto 10 seconds before with 2.4 kernel. 2.6 kernel loads in little more than 3 seconds! And this speed improvement can be seen with everything.

Moose
Seraph9

RE:want to get some basic concepts clear?

Post by Seraph9 »

There should be atleast one space between "cd" and ".." giving "cd .."
EyeScream

RE:want to get some basic concepts clear?

Post by EyeScream »

I'm sorry but you are completely wrong (alas) about 2.4 vs 2.6.

Yes, 2.6 gives a HUGE speed improvement on a multiprocessor machine, but as for uniprocessors... A properly built 2.4 kernel works 2 to 4 times as fast as a 2.6... I've tested it on my own computer, and I've used Linux for a long time so I know what I say when I speak about a properly built kernel =)

By the way, the distribution of Linux I suggest using is actually Gentoo (or Debian) as they are better in configuration and fine-tuning (I'm not kidding, although there are fewer tools to configure the system, the system is far less dependand on these configuration tools and you may edit some files by hand without breaking everything).

And, by the way, sitting under root is not good...

P.S. Acrobat Reader takes 4 seconds to start on my 1GHz CPU... Kernel is 2.4.26.
Moose

RE:want to get some basic concepts clear?

Post by Moose »

Well i only use linux, im not a developer, tester nor do i care.

As for fedora. Its based on redhat and thats what i like using. Im used to it now.

Im not joking about my acrobat times, maybe your right about rh not being fine tuned which is why it took as long as it did. All i know is the 2.6 kernel on my machine starts up faster to the point of displaying a login screen and loads programs faster, in the case of acrobat reader, konqueror etc, and my hardware has not changed so i can only presume its a faster kernel.

Moose
EyeScream

RE:want to get some basic concepts clear?

Post by EyeScream »

Well I have a completely opposite opinion of 2.6 kernel. It DID slow my system, that's for sure. And I've also had a few kernel deadlocks. It's still early beta code, so I don't suggest using it for now.

Well, perhaps the kernel 2.6 suited your hardware better. Try to recompile the 2.4 one with settings for your machine, I'm almost sure you will get a better result... =)

EyeScream.
Moose

RE:want to get some basic concepts clear?

Post by Moose »

When i switched to 2.6 i certainly did see a big difference.

But the switch was not just from one version of a rh to another, it was to fedora which is developed by the open source community and maybe they fine tune better than rh. Do rh fine tune at all on the professional range? I would imagine they only do that to the enterprise linux that they offer?

Moose
dany_gates_universal

RE:want to get some basic concepts clear?

Post by dany_gates_universal »

hi, it seems linux has become a HOT TOPIC  for discussion now!
But what i feel abt linux ,is something different!though many of u may not agree with it!
I think linux is not better than windows, i have both win and linux(RH9 previously and now Fedora core1),i was not able to find driver for my modem,eventhough i found many they had some or other problem installing, they need kernel sources everytime they compile, and all other crazy stuff!
If thats not enough,we cannot play wmv files on any linux video player,performance is not good (as compared to windows,in many aspects),basically nothing is well managed,in linux atall.

Now i know what u guys would be saying,"Man!Linux has robust architechture,see how many holes are they in windows,have u ever heard of so much attacks on linux?no!"
Now for this what i feel is its just that linux is used only on abt approx 10% of PCs, then why would a prof hacker want to waste his time hacking a system,which would not affect large no of PCS! well time will tell which is more robust win or linux
Conclusion: linux is good for professional users who understand linux well,
            windows is good for both professionals and beginners (though at a cost , but its ok)!

Look guys i am not against linux, or with win,i just wanna tell the fact. And what i believe in is a Proprietery OSes,and abt the MS monopoly,why dont just anyone dare challenge them,make ur OS 5 times better than win, and surely will defeat windows, everyone know win's architechture is not very robust!
CHALLENGE THEM! I AM WITH U! :)

ok much said abt lin and win, tell me some good IDE for building apps with yasm. ide should be for windows. i have nearly given up on linux!
Post Reply