Writing this post was prompted by the fact that
iley posts stopped, and the habra people still wanted posts on the axis. I will make a reservation right away, I myself study and write a small axis, but
I study , so we will move together. I'm going to consider writing systems under protected mode for IA-32, to talk about:
1) Design;
2) debugging;
3) Working with graphics;
4) Work with disks;
5) Memory management;
6) Task management;
Perhaps about something else, if it is claimed.
I) Design.But not to be unfounded, let me start with a story about design.
1) So, let's start with the idea of writing our own axis - why is this? Probably, you already know the answer - the study of architecture, understanding of the work of processors and peripheral devices. This is right.
2) Next - what type of kernel should I use?
Let's list the types and features of the nucleus:
')
1)
Monolithic.The name speaks for itself: a huge piece of code works in one common address space, it is difficult to expand, when one part (function, I don’t know how to call it better) falls, the entire core falls.
2)
Modular.This type appeared due to the evolution of system architectures. Here the functionality is divided into modules, each of which is responsible for its own, special function. However, all these modules work again in a single address space, which affects the security of the entire system. In principle, the modular core is a subspecies monolithic.
3)
Microkernel or µ-core.Here, everything is approximately the same as in the modular core, only services (modules) are executed in different address spaces.
Honestly, it is better to start with a modular core, since it is most earthbound and primitive.
Further, the developer is free to invent his own concepts, implement them.
Further we decide what our system will be:
monotaskovy or
multi . In my opinion it is better to start with mono-touch, and then develop it further.
Now about the bootloader: some use known GRUB or LILO, but in my opinion it is better to write it yourself. For me personally, the KOLIBRI bootloader served as an example for parsing, since the opensource project; We take the best debugger for novice coders - a notebook and a pencil, and we sort the bootloader on the shelves.
File system : in general it is better to start with FAT, then move on to others. Some decide to write their own, and this is good - the architecture and working with disk drives are becoming very clear.
Now let's talk about
services (since we started on a modular core).
Not bad to implement the following:
1) Video service: print, standard screen functions.
2) Disk service: we assign all disk operations to it - from transferring THS to LBA to operations with flash drives.
3) Memory management service: it’s understandable by name. Although this is the most difficult part to implement and theory.
4) Task management service: this is also not an easy task, but we will get closer to it.
That, in principle, is the first general overview. Until next release!