aboutsummaryrefslogtreecommitdiff
path: root/fr_FR.ISO8859-1/books/developers-handbook/locking/chapter.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'fr_FR.ISO8859-1/books/developers-handbook/locking/chapter.sgml')
-rw-r--r--fr_FR.ISO8859-1/books/developers-handbook/locking/chapter.sgml335
1 files changed, 0 insertions, 335 deletions
diff --git a/fr_FR.ISO8859-1/books/developers-handbook/locking/chapter.sgml b/fr_FR.ISO8859-1/books/developers-handbook/locking/chapter.sgml
deleted file mode 100644
index 37fdcf17d1..0000000000
--- a/fr_FR.ISO8859-1/books/developers-handbook/locking/chapter.sgml
+++ /dev/null
@@ -1,335 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
-<!--
- The FreeBSD Documentation Project
- The FreeBSD French Documentation Project
- The FreeBSD SMP Next Generation Project
- $Id: chapter.sgml,v 1.2 2002-12-11 16:31:20 gioria Exp $
- Original revision: 1.3
- $FreeBSD$
--->
-
-
-<chapter id="locking">
- <title>Notes sur le verrouillage</title>
-
- <para><emphasis>Ce chapître est maintenu par The FreeBSD SMP Next
- Generation Project. Envoyez leur directement les commentaires et
- les suggestions à &a.smp;.</emphasis></para>
-
- <para>Ce document souligne le verrouillage utilisé dans le noyau FreeBSD
- pour permettre d'utiliser du vrai multi-processeur &agrave; l'intérieur du noyau.
- Le verrouillage peut être réalisé par différents moyens.
- Les structures de données puvent être protégées par des mutex ou &man.lockmgr.9; verrous.
- Quelques variables sont protégées simplement par l'utilisation continuelle d'opérations
- atomiques pour y accéder.
- </para>
-
- <sect1>
- <title>Les mutex</title>
-
- <para>Un mutex est simplement un verrou utilisé pour garantir exclusion mutuelle.
- Spécifiquement, un mutex ne peut appartenir qu'&agrave; une entité &agrave; la fois.
- Si une autre entité désire obtenir un mutex déj&agrave; pris
- , elle doit attendre jusqu'&agrave; ce que le mutex soit relaché. Dans le noyau
- FreeBSD, les mutex appartiennent aux processus.</para>
-
- <para>Les mutex peuvent être acquis récursivement, mais ils sont conçus
- pour n'être pris que pendant une courte période. Spécifiquement, le détenteur
- ne doit pas se suspendre pendant qu'il retient un mutex. Si vous avez besoin de
- maintenir un verrouillage pendant une suspension, utilisez un &man.lockmgr.9; verrou ("lock").</para>
-
- <para>Chaque mutex a plusieurs intérêts :</para>
-
- <variablelist>
- <varlistentry>
- <term>Nom de la variable</term>
- <listitem>
- <para>Nom de la variable <type>struct mtx</type> dans
- le code source du noyau.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Nom logique</term>
- <listitem>
- <para>Le nom du mutex lui est assigné par
- <function>mtx_init</function>. Ce nom est affiché dans
- les messages de trace KTR, témoigne des erreurs et avertissements et est
- utilisé pour distinguer les mutex dans les traces.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Type</term>
- <listitem>
- <para>Le type du mutex en termes de constantes nommées
- <constant>MTX_*</constant>. La signification de chaque
- constante nommée est documentée dans &man.mutex.9;.</para>
-
- <variablelist>
- <varlistentry>
- <term><constant>MTX_DEF</constant></term>
- <listitem>
- <para>Un mutex endormi</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>MTX_SPIN</constant></term>
- <listitem>
- <para>Un mutex tournant</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>MTX_COLD</constant></term>
- <listitem>
- <para>Ce mutex est initialisé très tard. Toutefois, il
- doit être déclaré via
- <function>MUTEX_DECLARE</function>, et la constante nommée
- <constant>MTX_COLD</constant> doit être passée &agrave;
- <function>mtx_init</function>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>MTX_TOPHALF</constant></term>
- <listitem>
- <para>Ce mutex tournant ne désactive pas les
- interruptions.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>MTX_NORECURSE</constant></term>
- <listitem>
- <para>Ce mutex n'a pas la permission d'être recursif.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Protégés</term>
- <listitem>
- <para>Une liste de structures de données ou des membres de structure de données
- que cette entrée protège. Pour les membres de structures de données,
- le nom sera de la forme <structname>structure name</structname>.<structfield>member name</structfield>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Fonctions dépendantes</term>
- <listitem>
- <para>Les fonctions qui peuvent seulement être appelées si ce mutex est
- pris.</para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <table frame="all" colsep="1" rowsep="1" pgwide="1">
- <title>Liste du mutex</title>
-
- <tgroup cols="5">
- <thead>
- <row>
- <entry>Nom de la variable</entry>
- <entry>Nom logique</entry>
- <entry>Type</entry>
- <entry>Protégés</entry>
- <entry>Fonctions dépendantes</entry>
- </row>
- </thead>
-
- <!-- The scheduler lock -->
- <tbody>
- <row>
- <entry>sched_lock</entry>
- <entry><quote>sched lock</quote></entry>
- <entry>
- <constant>MTX_SPIN</constant> |
- <constant>MTX_COLD</constant>
- </entry>
- <entry>
- <varname>_gmonparam</varname>,
- <varname>cnt.v_swtch</varname>,
- <varname>cp_time</varname>,
- <varname>curpriority</varname>,
- <structname>mtx</structname>.<structfield>mtx_blocked</structfield>,
- <structname>mtx</structname>.<structfield>mtx_contested</structfield>,
- <structname>proc</structname>.<structfield>p_contested</structfield>,
- <structname>proc</structname>.<structfield>p_blocked</structfield>,
- <structname>proc</structname>.<structfield>p_flag</structfield>
- (<constant>P_PROFIL</constant> XXX,
- <constant>P_INMEM</constant>,
- <constant>P_SINTR</constant>,
- <constant>P_TIMEOUT</constant>,
- <constant>P_SWAPINREQ</constant> XXX,
- <constant>P_INMEN</constant> XXX),
- <structname>proc</structname>.<structfield>p_nice</structfield>,
- <structname>proc</structname>.<structfield>p_procq</structfield>,
- <structname>proc</structname>.<structfield>p_blocked</structfield>,
- <structname>proc</structname>.<structfield>p_estcpu</structfield>,
- <structname>proc</structname>.<structfield>p_nativepri</structfield>,
- <structname>proc</structname>.<structfield>p_priority</structfield>,
- <structname>proc</structname>.<structfield>p_usrpri</structfield>,
- <structname>proc</structname>.<structfield>p_rtprio</structfield>,
- <structname>proc</structname>.<structfield>p_rqindex</structfield>,
- <structname>proc</structname>.<structfield>p_stats->p_prof</structfield>,
- <structname>proc</structname>.<structfield>p_stats->p_ru</structfield>,
- <structname>proc</structname>.<structfield>p_stat</structfield>,
- <structname>proc</structname>.<structfield>p_cpticks</structfield>,
- <structname>proc</structname>.<structfield>p_iticks</structfield>,
- <structname>proc</structname>.<structfield>p_uticks</structfield>,
- <structname>proc</structname>.<structfield>p_sticks</structfield>,
- <structname>proc</structname>.<structfield>p_swtime</structfield>,
- <structname>proc</structname>.<structfield>p_slptime</structfield>,
- <structname>proc</structname>.<structfield>p_runtime</structfield>,
- <structname>proc</structname>.<structfield>p_pctcpu</structfield>,
- <structname>proc</structname>.<structfield>p_oncpu</structfield>,
- <structname>proc</structname>.<structfield>p_asleep</structfield>,
- <structname>proc</structname>.<structfield>p_wchan</structfield>,
- <structname>proc</structname>.<structfield>p_wmesg</structfield>,
- <structname>proc</structname>.<structfield>p_slpq</structfield>,
- <structname>proc</structname>.<structfield>p_vmspace</structfield>
- (XXX - in <function>statclock</function>),
- <varname>pscnt</varname>,
- <varname>slpque</varname>,
- <varname>itqueuebits</varname>,
- <varname>itqueues</varname>,
- <varname>rtqueuebits</varname>,
- <varname>rtqueues</varname>,
- <varname>queuebits</varname>,
- <varname>queues</varname>,
- <varname>idqueuebits</varname>,
- <varname>idqueues</varname>,
- <varname>switchtime</varname>,
- </entry>
- <entry>
- <function>setrunqueue</function>,
- <function>remrunqueue</function>,
- <function>mi_switch</function>,
- <function>chooseproc</function>,
- <function>schedclock</function>,
- <function>resetpriority</function>,
- <function>updatepri</function>,
- <function>maybe_resched</function>,
- <function>cpu_switch</function>,
- <function>cpu_throw</function>
- </entry>
- </row>
-
- <!-- The vm86 pcb lock -->
- <row>
- <entry>vm86pcb_lock</entry>
- <entry><quote>vm86pcb lock</quote></entry>
- <entry>
- <constant>MTX_DEF</constant> |
- <constant>MTX_COLD</constant>
- </entry>
- <entry>
- <varname>vm86pcb</varname>
- </entry>
- <entry>
- <function>vm86_bioscall</function>
- </entry>
- </row>
-
- <!-- Giant -->
- <row>
- <entry>Giant</entry>
- <entry><quote>Giant</quote></entry>
- <entry>
- <constant>MTX_DEF</constant> |
- <constant>MTX_COLD</constant>
- </entry>
- <entry>nearly everything</entry>
- <entry>lots</entry>
- </row>
-
- <!-- The callout lock -->
- <row>
- <entry>callout_lock</entry>
- <entry><quote>callout lock</quote></entry>
- <entry>
- <constant>MTX_SPIN</constant>
- </entry>
- <entry>
- <varname>callfree</varname>,
- <varname>callwheel</varname>,
- <varname>nextsoftcheck</varname>,
- <structname>proc</structname>.<structfield>p_itcallout</structfield>,
- <structname>proc</structname>.<structfield>p_slpcallout</structfield>,
- <varname>softticks</varname>,
- <varname>ticks</varname>
- </entry>
- <entry>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect1>
-
- <sect1>
- <title>Les verrous du gestionnaire de verrous (Lock Manager)</title>
-
- <para>Les verrous qui sont fournis par l'interface &man.lockmgr.9;
- sont les verrous du gestionnaire de verrous. Ces verrous sont des verrous
- lecture-écriture et peuvent être retenus par un process suspendu.
- </para>
-
- <table>
- <title>&man.lockmgr.9; List de verrou</title>
-
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Nom de la variable</entry>
- <entry>Protégés</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><varname>allproc_lock</varname></entry>
- <entry>
- <varname>allproc</varname>
- <varname>zombproc</varname>
- <varname>pidhashtbl</varname>
- <structname>proc</structname>.<structfield>p_list</structfield>
- <structname>proc</structname>.<structfield>p_hash</structfield>
- <varname>nextpid</varname>
- </entry>
- <entry><varname>proctree_lock</varname></entry>
- <entry>
- <structname>proc</structname>.<structfield>p_children</structfield>
- <structname>proc</structname>.<structfield>p_sibling</structfield>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect1>
-
- <sect1>
- <title>Variables protégées atomiquement</title>
-
- <para>Une variable protégée atomiquement est une variable spéciale qui
- n'est pas protégé par un verrou explicite. Toutefois, tous les accès de
- données aux variables utilisent des opérations atomiques spéciales
- comme décrit dans &man.atomic.9;. Très peu de variables sont traitées
- de cette façon, bien que les autres primitives de synchronisation comme
- les mutex soient implémentées avec des variables protégées atomiquement.</para>
-
- <itemizedlist>
- <listitem>
- <para><varname>astpending</varname></para>
- </listitem>
-
- <listitem>
- <para><structname>mtx</structname>.<structfield>mtx_lock</structfield></para>
- </listitem>
- </itemizedlist>
- </sect1>
-</chapter>