Nucleus Kernel Internals
Nucleus is the kernel that sits at the base of the Orion operating system. It is a 32-bit hybrid-kernel, targeting modern multi-processor computers. The internal structure of the kernel can be broken down into a set of sub-systems that all run in kernel-mode. At the very core of these modules is the kernel module, which functions like a traditional micro-kernel. The majority of architecture specific code resides in this module, which abstracts the features of an architecture into a well-defined interface. A version of this module exists for each architecture Nucleus supports. All other sub-systems call down to the core kernel for low-level services, except from where they cannot avoid doing it internally.
The Nucleus kernel is an object-based kernel, and the internal programming reflects this.
Each of the sub-systems implements a set of objects that it controls, which make up the bulk of the kernel.
Typically, every object has its own C source file, and any functions that operate on it are prefixed with the object's name (e.g. Thread$create creates a new Thread object).
For more information, see the Object Manager documentation.
Each sub-system provides one or more header files in the include/nucleus/ directory.
These files export the relevant structures, object types, global variables, and functions that can be accessed from other modules.
Sub-systems may also have internal headers where they need to share structures between multiple source files, but do not wish to export it.
Where possible, all information such as structures are kept completely opaque and in a single source file.
When an object implementation wants to maintain a set of private functions, it declares the functions as static, and prefixes them with an underscore (e.g. Scheduler$_dispatch).