Jump to content
  • Advertisement
Sign in to follow this  
Crypter

Operating Systems - Tutorial?

This topic is 4056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everone, I seen quite a few members here that seem to be interested in developing their own operating system. I have been thinking for some time: Why not develope a tutorial for it? There are indeed resources on the internet, but none of the resources are very easy for beginners. I have also seen only *one* step-by-step tutorial on it--and it doesnt go that far. What I am thinking of doing is developing a series of tutorials from the ground up, and from scratch.
  • Bootloaders
  • Kernel initialization and setup
  • Loading and reading FAT12 from BIOS
  • Mixing C and x86 Assembly
  • Filesystems
  • Low and High Level Memory Managers
  • The Kernel
  • Creating a command shell
  • 32bit protected mode, gdt, idt, and ldts
  • A20, keyboard and mouse input
...And more. The basic idea is creating a 32bit (Mabey graphical) operating system from scratch. As this is meant for beginners, I decided to put it here. Who knows, mabey it will be a small gaming OS[grin] If anyone is interested, let me know[smile]

Share this post


Link to post
Share on other sites
Advertisement
sure, it would be very usefull if it was done correctly.

I am not saying that you do not have the correct skills to do it, as I do not know you. Though, I am going to go ahead and ask..."have you created all of this before and know the differences to go about doing it, and the pros and cons of each way?" I hope that didn't sound rude where I am just saying that you do not have the skills. I didn't mean it for it to sound like that.

EDIT: Never mind. I just saw your signature. I take back what I said up above...

Chad

Share this post


Link to post
Share on other sites
If you know your stuff, which i presume that you do, I would like to read some thing like that.

Share this post


Link to post
Share on other sites
I'd love that! We've got a couple of OS programming courses at the university where I live, but I've never had the time to take anyone of them!

Share this post


Link to post
Share on other sites
Im currently creating a 32bit graphical OS myself, and know how hard it can be.

(Currently rewriting my two stage bootloader for better support for FAT12,
so the disk image can be read by Windows)

Dont worry--alot of the kernel is already written [smile]

Share this post


Link to post
Share on other sites
Im thinking of using NASM and C for simplicity.

It is possible with C++, however C++ is a bit harder to set up
to work properly.

What I mean by this is that you will need to create a workable
envirement for the languages to work in. (For example, defining
the global operators for C++, such as new and delete; allocating
space for ctors and dtors in the memory map, etc...)

C, as being a lower level language then C++, doesnt require
the envirement C++ needs, and hence is easier.

I will be stressing OOP and OOD princables as well as good
coding practices.

Im also thinking of using DJGPP as it is easier and more available
then other methods (Cygwin is less avilable, Visual Studio 2005
can be very tricky to set up for OS development).

If there are any suggestions on these languages (or the use of compiliers),
please let me know.

And thanks for the positive feedback so far! [smile]

Share this post


Link to post
Share on other sites
Just a couple of questions, no offence intended.

I think it's a complicated subject for writing tutorials, people bitch on Windows while there are countless people working on it who know what they're doing.

If you want to write tutorials they have to work on every piece of hardware the users of you're website have. How are you planning to cope with all combinations of different hardware?


  • What sections of the O.S. are you planning to write in Assembly? (My advice: only the bootloader, move away from assembly to some higher level asap.)

  • How are you planning to implement the C/C++ standard library?

  • What executable file format will you be using?

  • What kind of kernel will you make (monolithic, micro-kernel, etc)?

  • Are you planning to create you're own filesystem e.g. MyFS or make it compatible with Linux or MS - Windows?



I really don't mean to be negative, but creating a fully funtioning O.S. is a daunting task. But there's always some inspiration available so have a look!

MenueT OS

Share this post


Link to post
Share on other sites
I would have to say that I consider this approach a bad one. There are many different choices that needs to be made and with a walk-through approach like you propose the user wouldn't be exposed to all the different ideas. It can also very quickly become a copy-paste challenge because the user doesn't understand the rationale behind decisions and are able to make their own decisions (this also happens in the game programming introduction tutorials).

With an approach like what you propose how do you intend to expose your readers to several page replacement algorithms and their implementations? How about different addressing modes like direct addressing, segmentation or paging. How will you expose your readers to the variety of ways of handling addressing and its related algorithms?

I think the proper way to teach people about operating systems is to teach the concepts and start from a higher-level than the bootloader (maybe scheduling, process management or something like that) and then, when people completely understand all the concepts then they can start learning how to implement it, which shouldn't be hard at that point. Therefore I find the approach used by books like Operating system concepts.

There are just so many concepts that you can't hope to cover more than a small fraction using a walk-through tutorial.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!