\makeglossaries

% ----------------------------------
% Acronyms
\newacronym{api}{API}{Application Programming Interface}
\newacronym{fifo}{FIFO}{First-In, First-Out}
\newacronym{io}{I/O}{Input and Output}
\newacronym{numa}{NUMA}{Non-Uniform Memory Access}
\newacronym{prng}{PRNG}{Pseudo Random Number Generator}
\newacronym{raii}{RAII}{Resource Acquisition Is Initialization}
\newacronym{tls}{TLS}{Thread Local Storage}

% ----------------------------------
% Definitions

\longnewglossaryentry{thrd}
{name={thread}}
{
Threads created and managed inside user-space. Each thread has its own stack and its own thread of execution. User-level threads are invisible to the underlying operating system.

\textit{Synonyms : User threads, Lightweight threads, Green threads, Virtual threads, Tasks.}
}

\longnewglossaryentry{proc}
{name={processor}}
{

}

\longnewglossaryentry{rQ}
{name={ready-queue}}
{

}

\longnewglossaryentry{uthrding}
{name={user-level threading}}
{


\textit{Synonyms : User threads, Lightweight threads, Green threads, Virtual threads, Tasks.}
}

\longnewglossaryentry{rmr}
{name={remote memory reference}}
{

}

% ----------------------------------

\longnewglossaryentry{hthrd}
{name={hardware thread}}
{
Threads representing the underlying hardware directly, \eg the CPU core, or hyper-thread if the hardware supports multiple threads of execution per core. The number of hardware threads is considered to be always fixed to a specific number determined by the hardware.

\textit{Synonyms : }
}

\longnewglossaryentry{kthrd}
{name={kernel-level thread}}
{
Threads created and managed inside kernel-space. Each thread has its own stack and its own thread of execution. Kernel-level threads are owned, managed and scheduled by the underlying operating system.

\textit{Synonyms : OS threads, Hardware threads, Physical threads.}
}

\longnewglossaryentry{fiber}
{name={fiber}}
{
Fibers are non-preemptive user-level threads. They share most of the caracteristics of user-level threads except that they cannot be preempted by another fiber.

\textit{Synonyms : Tasks.}
}

\longnewglossaryentry{job}
{name={job}}
{
Unit of work, often sent to a thread pool or worker pool to be executed. Has neither its own stack nor its own thread of execution.

\textit{Synonyms : Tasks.}
}

\longnewglossaryentry{pool}
{name={thread-pool}}
{
Group of homogeneuous threads that loop executing units of works after another.

\textit{Synonyms : }
}

\longnewglossaryentry{preemption}
{name={preemption}}
{
Involuntary context switch imposed on threads at a given rate.

\textit{Synonyms : None.}
}



\longnewglossaryentry{at}
{name={task}}
{
Abstract object representing an unit of work. Systems will offer one or more concrete implementations of this concept (\eg \gls{kthrd}, \gls{job}), however, most of the concept of schedulings are independent of the particular implementations of the work representation. For this reason, this document use the term \Gls{at} to mean any representation and not one in particular.
}

\longnewglossaryentry{atsched}
{name={Scheduling a \gls{at}}}
{
Scheduling an \gls{at} refers to the act of notifying the scheduler that a task is ready to be ran. When representing the scheduler as a queue of tasks, scheduling is the act of pushing a task onto the end of the queue. This doesn't necesserily means the task will ever be allocated CPU time (\gls{atrun}), for example, if the system terminates abruptly, scheduled \glspl{at} will probably never run.

\textit{Synonyms : None.}
}

\longnewglossaryentry{atrun}
{name={Running a \gls{at}}}
{
Running an \gls{at} refers to the act of allocating CPU time to a task that is ready to run. When representing the scheduler as a queue of tasks, running is the act of poping a task from the front of the queue and putting it onto a \gls{proc}. The \gls{at} can than accomplish some or all of the work it is programmed to do.

\textit{Synonyms : None.}
}

\longnewglossaryentry{atmig}
{name={migration of \gls{at}}}
{
Migration refers to the idea of an \gls{at} running on a different worker/processor than the last time it was run. It is generally preferable to minimise migration as it incurs cost but any load balancing among workers requires some amount of migration.

\textit{Synonyms : None.}
}

\longnewglossaryentry{atpass}
{name={overtaking \gls{at}}}
{
When representing the scheduler as a queue of \glspl{at}, overtaking is the act breaking the FIFO-ness of the queue by moving a \gls{at} in front of some other \gls{at} when it arrived after. This remains true for schedulers that do not use a FIFO queue, when the order in which the \glspl{at} are \glslink{atsched}{scheduled} and \glslink{atrun}{run} in a different order. A \gls{at} is said to \emph{overtake} another if it is run \emph{before} but was \emph{scheduled} after the other \gls{at}.

\textit{Synonyms : None.}
}

\longnewglossaryentry{atblock}
{name={Blocking an \gls{at}}}
{
Blocking an abstract task refers to the act of taking a task that us running on a CPU off the CPU. Unless no other task is ready, this action is generally immediately followed by running an other task.

\textit{Synonyms : None.}
}

\longnewglossaryentry{atcomplet}
{name={Running to completion}}
{
Running to completion refers to the entire sequence of : being scheduled, running and blocking, for a given task.

See also \gls{atsched}, \gls{atrun}, \gls{atblock}

\textit{Synonyms : None.}
}

\longnewglossaryentry{load}
{name={System Load}}
{
The load is refers to the rate at which \glspl{at} are \glslink{atsched}{scheduled} versus the rate at which they are \glslink{atrun}{run}. When \glspl{at} are being scheduled faster than they are run, the system is considered \emph{overloaded}. When \glspl{at} are being run faster than they are scheduled, the system is considered \emph{underloaded}. Conrrespondingly, if both rates are equal, the system is considered \emph{loaded}. Note that the system is considered loaded only of the rate at which \glspl{at} are scheduled/run is non-zero, otherwise the system is empty, it has no load.
}

