+ git,wifi,divers,threads chapters

This commit is contained in:
2020-09-29 13:53:27 +02:00
parent e038d2feda
commit 9a9d3108ba
5 changed files with 222 additions and 4 deletions

50
chap/threads.tex Normal file
View File

@@ -0,0 +1,50 @@
\chapter{threads}
\index{threads}
% ----------------------------------------------------------------
Ahemmm, par quoi commencer\footnote{Par de l'aspirine ?} ? Par un
extrait de la page \texttt{pthreads(6)} ? Voilà, ça c'est bien :
\begin{quote}
POSIX.1 specifies a set of interfaces (functions, header files) for
threaded programming commonly known as Pthreads.
A single process can contain multiple threads, all of which are
executing the same program. These threads share the same global
memory (data and heap segments), but each thread has its own stack
(automatic variables).
\end{quote}
Et c'est là que les ennuis potentiels débarquent :
\textit{share the same global memory}, ce qui veut dire en gros
«~se partagent la même mémoire globale~».
% ----------------------------------------------------------------
\section{ITC}
\index{ITC}
\textit{Inter Thread Communication}
Imaginons une application avec un thread qui fait le travail effectif
(nous le nommerons \textsl{worker}), et plusieurs autres threads
qui attendent des ordres de l'extérieur (telnet, MIDI\index{MIDI},
joystick\index{joystick}\dots) et qui doivent passer ces commandes
au \textsl{worker}.
Comment allons-nous procéder\footnote{Et c'est une vraie question !} ?
Une première piste : http://tools.ietf.org/html/rfc3117
% ----------------------------------------------------------------
\section{Un exemple}
XXX\index{XXX}
% ----------------------------------------------------------------