1 \documentclass[a4paper,
10pt
]{article
}
5 \title{\textbf{System Initialization
}}
7 \date{\textit{July
16,
2008}}
11 \paragraph{}Quarn OS uses its own bootloader to boot and prepare CPU and whole computer to
12 execute kernel's code. There is a different version of bootloader code for each
13 architecture, becasue it is written in assembler language, so it is platform
14 dependent. There is also posibillity to choose a file system that system loader
15 will be read from, but the certain reading procedures have to be included at
16 compilation. Bootloader can not be larger than
512 bytes, so everything has to
18 \paragraph{}Optionally Quarn OS can use GRUB or other bootloaders to boot. Then another
19 version of system loader is used (more information in the next point), which
20 will create the same enivronment of execution (as after booting using Quarn's
21 bootloader) before running kernel.
22 \paragraph{}The exact operations done by bootloader depends on the platform it is
23 designed for. More information can be found in the source code and docs
24 for the certain architecture.
26 \section{System loader
}
27 \paragraph{}When using the standard Quarn OS bootloader, system loader is treated as a
28 second stage. Its task is to prepare CPU (and other parts of hardware) to run
29 the kernel. System loader also loads the executable file which consist of Quarn
30 and prepares it to execute (if it is needed by the format of the file).
31 \paragraph{}If external bootloader is used, system loader provides a needed interface for
32 it (for example, if using GRUB, system loader implements all parts of Muliboot
33 Specification needed). Then, if it is necessary system loader prepares the
34 computer to execute the kernel.
35 \paragraph{}The exact operations done by system loader depends on the platform it is
36 designed for. More information can be found in the source code and docs
37 for the certain architecture.
39 \section{Initializing kernel (low-level)
}
40 \paragraph{}When boots, first thing that kernel does is to prepare system to executed code
41 written in the C++ programming language. It means that kernel calls constructors
42 of all static and global objects.
43 \paragraph{}Then kernel launches Managed Execution System Initializer. It creates and initiliazes
44 the main manager of Manes. Then the manager is connected to the Managed Execution System
45 Controller (Manec) instance that is used by core Quarn OS code. From now Manes is ready to work.
47 \section{Initializing kernel (high-level)
}
48 \paragraph{}When kernel is prepared to operate Manec procedure registers main creators types,
49 built-in objects types. Then all controllers are created and initialized (animated). This operation
50 includes scaning buses for devices, loading file system metadata, connecting to remote Manes
51 servers, creating task switch segments. More information about animating a specific creator can be
52 found in its documentation.
53 \paragraph{}The final step is to load module from file ``start.ko'' and execute it using an actors
54 system. The module should launch shell or login prompt and allow user to communicate with the system.