[bootlin/training-materials updates] master: Realtime: misc updates and improvements (d19840b1)
Michael Opdenacker
michael.opdenacker at bootlin.com
Tue Mar 16 22:05:37 CET 2021
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/d19840b1d342a884e43940960ccc2bf31beaf8d1
>---------------------------------------------------------------
commit d19840b1d342a884e43940960ccc2bf31beaf8d1
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date: Tue Mar 16 22:05:37 2021 +0100
Realtime: misc updates and improvements
- In particular, talk about threads instead of processes
after explaining the difference
- Minor other changes
Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
>---------------------------------------------------------------
d19840b1d342a884e43940960ccc2bf31beaf8d1
lab-data/embedded-linux/realtime/data/rttest.c | 0
slides/sysdev-realtime/sysdev-realtime.tex | 25 ++++++++++++++-----------
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/slides/sysdev-realtime/sysdev-realtime.tex b/slides/sysdev-realtime/sysdev-realtime.tex
index e63735b6..384899ba 100644
--- a/slides/sysdev-realtime/sysdev-realtime.tex
+++ b/slides/sysdev-realtime/sysdev-realtime.tex
@@ -547,7 +547,7 @@
\frametitle{PREEMPT\_RT mainlining status (1)}
\begin{itemize}
\item The project is making good progress since it got funding from
- the Linux foundation in 2015.
+ the Linux Foundation in 2015.
\item However, a reduction of the size of the PREEMPT\_RT patchset
is not really visible yet:\\
\vfill
@@ -650,7 +650,7 @@
\begin{frame}[fragile]
\frametitle{Creating threads}
\begin{itemize}
- \item Linux support the POSIX thread API
+ \item Linux supports the POSIX thread API
\item To create a new thread
\begin{block}{}
\small
@@ -682,14 +682,14 @@ pthread_join(pthread_t *thread, void **value_ptr);
\end{frame}
\begin{frame}
- The Linux kernel scheduler support different scheduling classes
+ The Linux kernel scheduler supports different scheduling classes
\frametitle{Scheduling classes (1)}
\begin{itemize}
\item The default class (\code{SCHED_OTHER}),
- in which processes are started by default,
+ in which threads are started by default,
is a {\em time-sharing} class
\begin{itemize}
- \item All processes, regardless of their priority, get some CPU time
+ \item All threads, regardless of their priority, get some CPU time
\item The proportion of CPU time they get is dynamic and affected
by the {\em nice} value, which ranges from -20 (highest) to 19
(lowest). Can be set using the \code{nice} or \code{renice} commands
@@ -704,13 +704,13 @@ pthread_join(pthread_t *thread, void **value_ptr);
\ksym{SCHED_DEADLINE}
\begin{itemize}
\item RT Priorities ranging from 0 (lowest) to 99 (highest)
- \item The highest RT priority process gets all the CPU time, until it
+ \item The highest RT priority threads gets all the CPU time, until it
blocks.
\item With \ksym{SCHED_FIFO}, {\em First In, First Out}, each additional
- process with the same RT priority has to wait for the first ones to block.
+ threads with the same RT priority has to wait for the first ones to block.
\item In \ksym{SCHED_RR}, {\em Round-Robin} scheduling between the
- processes with the same RT priority. All must block before
- lower priority processes get CPU time.
+ threads with the same RT priority. All must block before
+ lower priority threads get CPU time.
\item In \ksym{SCHED_DEADLINE}: guarantees that an RT task
will be given an exact amount of cpu time every period.
\end{itemize}
@@ -731,7 +731,7 @@ pthread_join(pthread_t *thread, void **value_ptr);
\code{-d}: \ksym{SCHED_DEADLINE}
\end{itemize}
\item The \code{sched_setscheduler()} API can be used to change the scheduling class
- and priority of a process
+ and priority of a threads
\begin{block}{}
\begin{verbatim}
int sched_setscheduler(pid_t pid, int policy,
@@ -879,6 +879,9 @@ timer_delete(timer_t timerid)
\end{block}
\item Get the resolution of a clock, \code{clock_getres}
\item Other functions: \code{timer_getoverrun()}, \code{timer_gettime()}
+ \item You can also directly use \code{nanosleep()} or
+ \code{lock_nanosleep()} to transparently setup timers for
+ specified amounts of time.
\end{itemize}
\end{frame}
@@ -1019,7 +1022,7 @@ cat /sys/kernel/tracing/tracing_max_latency
\frametitle{RTLinux}
First real-time extension for Linux, created by Victor Yodaiken.
\begin{itemize}
- \item Nice, but the author filed a software patent covering the
+ \item However, the author filed a software patent covering the
addition of real-time support to general operating systems as
implemented in RTLinux!
\item Its Open Patent License drew many developers away and
More information about the training-materials-updates
mailing list