summaryrefslogtreecommitdiffhomepage
path: root/doc/tex/nekernel_smp_subsystem.tex
blob: cb30f3cbd15f758e7c8da0a542d6396729b3251d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
\documentclass{article}
\usepackage{graphicx}

\title{NeKernel: The SMP Subsystem}
\author{Amlal El Mahrouss}
\date{\today}

\begin{document}

    \maketitle

    \section{Abstract}

    {NeKernel is a hybrid based operating system kernel written in modern C++ (C++17/C++20). It features a bootloader, kernel, tools, libraries, and frameworks. This document is about the SMP subsystem of the kernel.}

    \section{Design Overview}

    {NeKernel is designed with SMP by default. Although it may fallback under classic preemptive round-robin scheduling when unavailable - NeKernel runs best on a SMP based machine. The subsystem goes from the HardwareThreadScheduler to the Hardware Abstraction Layer's Application Processor API.}

    \section{The SMP Subsystem}

    {The SMP subsystem consist of the HTS (HardwareThreadScheduler) and AP (Application Processor) APIs. Those systems are made to handle SMP tasks inside NeKernel.}

    \subsection{Higher Level: HardwareThreadScheduler (HTS)}

    {HTS's main purpose is to make cores all busy with a StackFrame object. That object contains program registers such as the stack pointer and instruction pointer. Each task is fairly assigned to then be run by the AP's mp\_register\_task function.}

    \subsection{Lower Level: Application Processor (AP) API}

    {Application Processors (now referred as AP) is the API taking care of multi-core scheduling, very platform dependent (thus its presence on the HAL) it is designed to run tasks passed from the HTS.}

\end{document}