Required Knowledge

From OSDev.wiki
Revision as of 13:30, 20 February 2012 by Solar (talk | contribs) (Reverted edits by Solar (talk) to last revision by Bellezzasolo)
Jump to navigation Jump to search

If you think you can skip this, it's probably just for you.

Writing an OS is not a beginner's task. In fact, writing an OS is usually considered the most difficult programming task. You will need above-average programming skills before even considering a project like this. Failure to comply will make you look silly.

Some things you will need to know are:

  • Basic Computer Science: You need to be intimately familiar with hexadecimal and binary notation as well as boolean logic and similar fundamental knowledge, like data structures, their construction and manipulation, searching and sorting algorithms, abstract programming concepts, etc. etc..
  • Language and Vocabulary: You need to be able to read and write (technical) English at a competent level. Virtually all technical documentation is in English, and most of the resources you could find on the web (like this Wiki and the forum) are, also. Using incorrect terminology will make you look foolish and confuse the people willing to help you.
  • Language and Vocabulary, pt. 2: Most operating systems featured on this site, as well as most of the code snippets and examples, are written in C (or C++). Even if you choose to use another language (like FreeBASIC or Pascal), C is the lingua franca of programming, and you should be competent in making heads and tails of it.
  • Assembly: You should have knowledge about the low-level language Assembly. Read a book. Take a course at school. At least read some tutorials, and write some user-space code to familiarize yourself with it. You will need it, even if you plan to write most of your operating system in a higher-level language.
  • Programming experience: Learning about programming with an OS project is considered a bad idea. Not only should you know the language in which you will be developing inside out, you should also be familiar with version control, debugging, etc. - in short, you should have written quite a few user-space programs in that language successfully before trying OS development.
  • UNIX experience: You will soon notice that many of the tools used in OS development are developed for Unix, and later ported over to Windows. The Linux kernel is often used as reference or example for how things can be done, and many of the hobby operating systems have some resemblance to Unix. Having some experience with the Unix command line (bash or ksh) is a minimum. (Cygwin provides an easy-to-install Unix command line for Windows.)
  • Toolchain: You must know the behavioral details of your compiler, assembler, linker, and make utility. You should have the documentation of the tools you use at hand, and refer to them before asking the community. Rest assured that any possible beginner's question about GCC, GNU as, NASM, GNU ld, Visual Studio and GRUB has been answered twice over. Search before you ask.
  • Executable Formats: Kernel space programming has many additional requirements unknown to application development. Being able to parse executable binaries is one of them (you do want your OS to load and execute applications, do you?) Make yourself familiar with Executable File Types, their internal structure, and how a linker generates them.
  • The Platform: You should have studied the manuals for the processor you will be programming for. They contain the information you need to design your kernel in the first place. Asking for information that can easily be obtained from these documents will only give cause to "Read The (...) Manual" responses, or simply RTFM.
  • The Concept: You should have an understanding of how existent operating systems function at the technical level (e.g. by having read some Books), what is good or bad about them, and how you want to go about your own OS. Having finished some tutorial and then asking "what now?" in one of the forums will just make you look silly.