1 | \makeglossaries |
---|
2 | |
---|
3 | % ---------------------------------- |
---|
4 | % Acronyms |
---|
5 | \newacronym{api}{API}{Application Programming Interface} |
---|
6 | \newacronym{fifo}{FIFO}{First-In, First-Out} |
---|
7 | \newacronym{io}{I/O}{Input and Output} |
---|
8 | \newacronym{numa}{NUMA}{Non-Uniform Memory Access} |
---|
9 | \newacronym{raii}{RAII}{Resource Acquisition Is Initialization} |
---|
10 | \newacronym{tls}{TLS}{Thread Local Storage} |
---|
11 | |
---|
12 | % ---------------------------------- |
---|
13 | % Definitions |
---|
14 | |
---|
15 | \longnewglossaryentry{thrd} |
---|
16 | {name={thread}} |
---|
17 | { |
---|
18 | 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. |
---|
19 | |
---|
20 | \textit{Synonyms : User threads, Lightweight threads, Green threads, Virtual threads, Tasks.} |
---|
21 | } |
---|
22 | |
---|
23 | \longnewglossaryentry{proc} |
---|
24 | {name={processor}} |
---|
25 | { |
---|
26 | |
---|
27 | } |
---|
28 | |
---|
29 | \longnewglossaryentry{rQ} |
---|
30 | {name={ready-queue}} |
---|
31 | { |
---|
32 | |
---|
33 | } |
---|
34 | |
---|
35 | \longnewglossaryentry{uthrding} |
---|
36 | {name={user-level threading}} |
---|
37 | { |
---|
38 | |
---|
39 | |
---|
40 | \textit{Synonyms : User threads, Lightweight threads, Green threads, Virtual threads, Tasks.} |
---|
41 | } |
---|
42 | |
---|
43 | % ---------------------------------- |
---|
44 | |
---|
45 | \longnewglossaryentry{hthrd} |
---|
46 | {name={hardware thread}} |
---|
47 | { |
---|
48 | 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. |
---|
49 | |
---|
50 | \textit{Synonyms : } |
---|
51 | } |
---|
52 | |
---|
53 | \longnewglossaryentry{kthrd} |
---|
54 | {name={kernel-level thread}} |
---|
55 | { |
---|
56 | 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. |
---|
57 | |
---|
58 | \textit{Synonyms : OS threads, Hardware threads, Physical threads.} |
---|
59 | } |
---|
60 | |
---|
61 | \longnewglossaryentry{fiber} |
---|
62 | {name={fiber}} |
---|
63 | { |
---|
64 | 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. |
---|
65 | |
---|
66 | \textit{Synonyms : Tasks.} |
---|
67 | } |
---|
68 | |
---|
69 | \longnewglossaryentry{job} |
---|
70 | {name={job}} |
---|
71 | { |
---|
72 | 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. |
---|
73 | |
---|
74 | \textit{Synonyms : Tasks.} |
---|
75 | } |
---|
76 | |
---|
77 | \longnewglossaryentry{pool} |
---|
78 | {name={thread-pool}} |
---|
79 | { |
---|
80 | Group of homogeneuous threads that loop executing units of works after another. |
---|
81 | |
---|
82 | \textit{Synonyms : } |
---|
83 | } |
---|
84 | |
---|
85 | \longnewglossaryentry{preemption} |
---|
86 | {name={preemption}} |
---|
87 | { |
---|
88 | Involuntary context switch imposed on threads at a given rate. |
---|
89 | |
---|
90 | \textit{Synonyms : None.} |
---|
91 | } |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | \longnewglossaryentry{at} |
---|
96 | {name={fred}} |
---|
97 | { |
---|
98 | 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. |
---|
99 | } |
---|
100 | |
---|
101 | \longnewglossaryentry{atsched} |
---|
102 | {name={Scheduling a \gls{at}}} |
---|
103 | { |
---|
104 | 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. |
---|
105 | |
---|
106 | \textit{Synonyms : None.} |
---|
107 | } |
---|
108 | |
---|
109 | \longnewglossaryentry{atrun} |
---|
110 | {name={Running a \gls{at}}} |
---|
111 | { |
---|
112 | 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. |
---|
113 | |
---|
114 | \textit{Synonyms : None.} |
---|
115 | } |
---|
116 | |
---|
117 | \longnewglossaryentry{atmig} |
---|
118 | {name={migration of \gls{at}}} |
---|
119 | { |
---|
120 | 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. |
---|
121 | |
---|
122 | \textit{Synonyms : None.} |
---|
123 | } |
---|
124 | |
---|
125 | \longnewglossaryentry{atpass} |
---|
126 | {name={overtaking \gls{at}}} |
---|
127 | { |
---|
128 | 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}. |
---|
129 | |
---|
130 | \textit{Synonyms : None.} |
---|
131 | } |
---|
132 | |
---|
133 | \longnewglossaryentry{atblock} |
---|
134 | {name={Blocking an \gls{at}}} |
---|
135 | { |
---|
136 | 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. |
---|
137 | |
---|
138 | \textit{Synonyms : None.} |
---|
139 | } |
---|
140 | |
---|
141 | \longnewglossaryentry{atcomplet} |
---|
142 | {name={Running to completion}} |
---|
143 | { |
---|
144 | Running to completion refers to the entire sequence of : being scheduled, running and blocking, for a given task. |
---|
145 | |
---|
146 | See also \gls{atsched}, \gls{atrun}, \gls{atblock} |
---|
147 | |
---|
148 | \textit{Synonyms : None.} |
---|
149 | } |
---|
150 | |
---|
151 | \longnewglossaryentry{load} |
---|
152 | {name={System Load}} |
---|
153 | { |
---|
154 | 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. |
---|
155 | } |
---|
156 | |
---|