Required Knowledge

From OSDev Wiki
Jump to navigation Jump to search

This page or section refers to its readers or editors using I, my, we or us. It should be edited to be in an encyclopedic tone.

Beginners in OSDev are strongly recommended not to skip this.

Due to the complexity of the task, writing an OS requires a high level of familiarity and experience with programming and computer science concepts.

Developing an OS requires knowledge on the following areas:

  1. Basic Computer Science: Intimate familiarity 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.
  2. Language and Vocabulary: Ability to read and write (technical) English. Virtually all technical documentation is in English, including most of the resources on the web (like this Wiki and the forum are). Correct terminology is imperative for receiving proper assistance.
  3. 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++). Due to this, a strong understanding of C is required for OS development.
  4. Assembly: Knowledge about the low-level language Assembly. Resources for learning include books and school/college courses. Writing user-space code serves as practice. A strong understanding of Assembly is required, even if one plans to write most of the operating system in a higher-level language.
  5. Programming experience: Developing OS projects requires experience with developing user-space programs and a good understanding of the programming language that will be used before proceeding with a project. Knowledge of concepts such as version control and debugging is required.
  6. Programming Practices: Ability to write both code and user documentation, and be able to document all aspects of code and design, even if the project is purely for personal use. Programmers must learn and use appropriate Code Management practices, including setting up and using an off-site repository (e.g. Savannah, GitHub, GitLab, Heroku) in order to prevent any issues during development.
  7. UNIX experience: Most OS development tools are developed natively for Unix. The Linux kernel is a reference for how things can be done, and many of the hobby operating systems have some resemblance to Unix. Having experience with the Unix command line (preferably Bash or ksh) is a very important requirement. (Cygwin provides an easy-to-install Unix command line for Windows.) For Windows users, this can be accomplished by using a virtualizer (see below) to host a virtual system, without the need to re-partition the home system. Windows Subsystem for Linux (WSL) also allows access to the Unix command line. macOS users can use the Terminal--macOS is built on a Unix variant kernel (a combination of the Mach and BSD kernels), if Xcode and an emulator or virtualizer are installed, no further tools are necessary (a cross-compiler is still required); the default Terminal shell is the Z Shell, but C shell and KornShell are available as well.
  8. Toolchain: Knowledge of the behavioral details of the compiler, assembler, linker, and make utility. Being able to understand emitted warnings and errors. Tool documentations are the first source that should be referenced. Answer to most beginner's questions about GCC, GNU as, NASM, GNU ld, Visual Studio, and GRUB can be found online.
  9. Emulators and Virtualizers: Familiarity with tools such as Bochs, VirtualBox, QEMU, or Virtual PC. These tools provide a buffer between real hardware and the test system. Knowledge of these tools is required prior to starting OS development.
  10. Executable Formats: Kernel space programming has many additional requirements unknown to application development. Being able to parse executable binaries is an example. One should familiarize themselves with Executable File Types, their internal structure, and how a linker generates them.
  11. The Platform: Read the manuals for the processor that the code will be written for. They contain the information required to design the kernel.
  12. The Concept: Technical knowledge of currently existing operating systems is beneficial as these are built on the same principles required for any successful OS project.

See Also

  • A good (but unfinished) book on the topic: Operating Systems From 0 to 1. This book covers transistors, logic circuits, Assembly and C language, ELF format and debugging, etc.

Articles