diff --git a/ru_RU.KOI8-R/books/arch-handbook/locking/chapter.sgml b/ru_RU.KOI8-R/books/arch-handbook/locking/chapter.sgml new file mode 100644 index 0000000000..67bc140449 --- /dev/null +++ b/ru_RU.KOI8-R/books/arch-handbook/locking/chapter.sgml @@ -0,0 +1,346 @@ +<!-- + The FreeBSD Russian Documentation Project + + The FreeBSD SMP Next Generation Project + + $FreeBSD$ + $FreeBSDru: frdp/doc/ru_RU.KOI8-R/books/arch-handbook/locking/chapter.sgml,v 1.4 2005/06/04 10:17:39 gad Exp $ + + Original revision: 1.9 +--> + +<chapter id="locking"> + <title>��������� �� ����������</title> + + <indexterm><primary>SMP Next Generation Project</primary></indexterm> + <para><emphasis>��� ����� �������������� �������� FreeBSD SMP Next + Generation Project. ����������� � ��������� ����������� + � &a.smp;.</emphasis></para> + + <indexterm><primary>����������</primary></indexterm> + <indexterm><primary>multi-processing</primary></indexterm> + <indexterm><primary>��������</primary></indexterm> + <indexterm><primary>lockmgr</primary></indexterm> + <indexterm><primary>��������� ��������</primary></indexterm> + <para>���� �������� ��������� �������� ����������, ������������ � ���� + FreeBSD ��� ����������� ����������� ��������� ���������� ����������� � + ����. ���������� ����� ������������� � ���������� ����� ������. + ��������� ������ ����� ���� �������� � ������� ���������� mutex ��� + &man.lockmgr.9;. ��������� ���������� �������� ������ � ���� ����������� + ������������ ��� ������� � ��� ��������.</para> + + <sect1 id="locking-mutexes"> + <title>��������</title> + + <para>������� (mutex) - ��� ������ ����������, ������������ ��� + ���������� ��������������� ����������������. � ���������, � ������ + ������ ������� ��������� ����� ������� ������ ���� ������. ���� + �����-�� ������ ����� �������� �������, ������� ��� ���-�� �����, �� + ������ ��������� ������� ��� ������������. � ���� FreeBSD ����������� + ��������� �������� ��������.</para> + + <para>�������� ����� ���� ����������� ����������, �� ��������������, ��� + ��� ���������� �� �������� �����. � ���������, ��������� �������� + ������ ����������� �����. ���� ��� ����� ��������� ���������� �� ����� + �����, ����������� ���������� ����� &man.lockmgr.9;.</para> + + <para>������ ������� ����� ��������� �������������� ������� + �������������:</para> + + <variablelist> + <varlistentry> + <term>��� ����������</term> + <listitem> + <para>��� ���������� <type>struct mtx</type> � �������� ������� + ����.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term>���������� ���</term> + <listitem> + <para>��� ��������, ����������� ��� ����� + <function>mtx_init</function>. ��� ��� ��������� � ���������� + ����������� KTR � ��������������� ��������������� � ��������� + ���������� � ������������ ��� ������������� ��������� � + ���������� ����.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term>���</term> + <listitem> + <para>��� �������� � �������� ������ <constant>MTX_*</constant>. + �������� ������� ����� ������� � ��� ������� ���, ��� ��� ������� + � &man.mutex.9;.</para> + + <variablelist> + <varlistentry> + <term><constant>MTX_DEF</constant></term> + <listitem> + <para>Sleep-�������</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><constant>MTX_SPIN</constant></term> + <listitem> + <para>Spin-�������</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><constant>MTX_RECURSE</constant></term> + <listitem> + <para>����� �������� ����������� ����������� + ����������.</para> + </listitem> + </varlistentry> + </variablelist> + </listitem> + </varlistentry> + + <varlistentry> + <term>������</term> + <listitem> + <para>������ �������� ������ ��� ������ �������� ������, ������� + �������� ���� �������. ��� ������ �������� ������ ��� ����� � + ����� + <structname/��� ���������/.<structfield/��� ����� + ���������/.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term>��������� �������</term> + <listitem> + <para>�������, ������� ����� �������, ���� ���� ������� + �����.</para> + </listitem> + </varlistentry> + </variablelist> + + <table frame="all" colsep="1" rowsep="1" pgwide="1"> + <title>������ ���������</title> + + <indexterm><primary>����������</primary> + <secondary>sched_lock</secondary></indexterm> + + <indexterm><primary>����������</primary> + <secondary>vm86pcb_lock</secondary></indexterm> + + <indexterm><primary>����������</primary> + <secondary>Giant</secondary></indexterm> + + <indexterm><primary>����������</primary> + <secondary>callout_lock</secondary></indexterm> + + <tgroup cols="5"> + <thead> + <row> + <entry>��� ����������</entry> + <entry>���������� ���</entry> + <entry>���</entry> + <entry>������</entry> + <entry>��������� �������</entry> + </row> + </thead> + + <!-- ���������� ������������ ����� --> + <tbody> + <row> + <entry>sched_lock</entry> + <entry><quote>sched lock</quote></entry> + <entry> + <constant>MTX_SPIN</constant> | + <constant>MTX_RECURSE</constant> + </entry> + <entry> + <varname>_gmonparam</varname>, + <varname>cnt.v_swtch</varname>, + <varname>cp_time</varname>, + <varname>curpriority</varname>, + <structname/mtx/.<structfield/mtx_blocked/, + <structname/mtx/.<structfield/mtx_contested/, + <structname/proc/.<structfield/p_procq/, + <structname/proc/.<structfield/p_slpq/, + <structname/proc/.<structfield/p_sflag/, + <structname/proc/.<structfield/p_stat/, + <structname/proc/.<structfield/p_estcpu/, + <structname/proc/.<structfield/p_cpticks/ + <structname/proc/.<structfield/p_pctcpu/, + <structname/proc/.<structfield/p_wchan/, + <structname/proc/.<structfield/p_wmesg/, + <structname/proc/.<structfield/p_swtime/, + <structname/proc/.<structfield/p_slptime/, + <structname/proc/.<structfield/p_runtime/, + <structname/proc/.<structfield/p_uu/, + <structname/proc/.<structfield/p_su/, + <structname/proc/.<structfield/p_iu/, + <structname/proc/.<structfield/p_uticks/, + <structname/proc/.<structfield/p_sticks/, + <structname/proc/.<structfield/p_iticks/, + <structname/proc/.<structfield/p_oncpu/, + <structname/proc/.<structfield/p_lastcpu/, + <structname/proc/.<structfield/p_rqindex/, + <structname/proc/.<structfield/p_heldmtx/, + <structname/proc/.<structfield/p_blocked/, + <structname/proc/.<structfield/p_mtxname/, + <structname/proc/.<structfield/p_contested/, + <structname/proc/.<structfield/p_priority/, + <structname/proc/.<structfield/p_usrpri/, + <structname/proc/.<structfield/p_nativepri/, + <structname/proc/.<structfield/p_nice/, + <structname/proc/.<structfield/p_rtprio/, + <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>switchticks</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>, + <function>need_resched</function>, + <function>resched_wanted</function>, + <function>clear_resched</function>, + <function>aston</function>, + <function>astoff</function>, + <function>astpending</function>, + <function>calcru</function>, + <function>proc_compare</function> + </entry> + </row> + + <!-- The vm86 pcb lock --> + <row> + <entry>vm86pcb_lock</entry> + <entry><quote>vm86pcb lock</quote></entry> + <entry> + <constant>MTX_DEF</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_RECURSE</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> | + <constant>MTX_RECURSE</constant> + + </entry> + <entry> + <varname>callfree</varname>, + <varname>callwheel</varname>, + <varname>nextsoftcheck</varname>, + <structname/proc/.<structfield/p_itcallout/, + <structname/proc/.<structfield/p_slpcallout/, + <varname>softticks</varname>, + <varname>ticks</varname> + </entry> + <entry> + </entry> + </row> + </tbody> + </tgroup> + </table> + </sect1> + + <sect1 id="locking-sx"> + <title>����������� ������������ ����������</title> + + <para>��� ���������� ������������ ������� ��� + ���������������� - �� ������/������ � ����� + �������������� ����������, ����������� � ��������� + ��������. �� ������� ������ ��� ����������� � &man.lockmgr.9;.</para> + + <table> + <title>������ ����������� ������������ ����������</title> + <indexterm><primary>����������</primary> + <secondary>allproc_lock</secondary></indexterm> + <indexterm><primary>����������</primary> + <secondary>proctree_lock</secondary></indexterm> + + <tgroup cols="2"> + <thead> + <row> + <entry>��� ����������</entry> + <entry>������</entry> + </row> + </thead> + <tbody> + <row> + <entry><varname>allproc_lock</varname></entry> + <entry> + <varname>allproc</varname> + <varname>zombproc</varname> + <varname>pidhashtbl</varname> + <structname/proc/.<structfield/p_list/ + <structname/proc/.<structfield/p_hash/ + <varname>nextpid</varname> + </entry> + </row> + <row> + <entry><varname>proctree_lock</varname></entry> + <entry> + <structname/proc/.<structfield/p_children/ + <structname/proc/.<structfield/p_sibling/ + </entry> + </row> + </tbody> + </tgroup> + </table> + </sect1> + + <sect1 id="locking-atomic"> + <title>�������� ���������� ����������</title> + + <indexterm><primary>�������� ����ݣ���� ����������</primary></indexterm> + + <para>����������, ���������� ��������, �������� ������ ����������, + ������� �� ���������� ����� �����������. ������ ����� ��� ������� � + ������ ���������� ������������ ����������� ��������� ��������, ��� + ������� � &man.atomic.9;. ���� ��������� ���������� ������������ ����� + �������, ���� ������ ��������� �������������, ����� ��� ��������, + ����������� � �������� ����������� �����������.</para> + + <itemizedlist> + <listitem> + <para><structname/mtx/.<structfield/mtx_lock/</para> + </listitem> + </itemizedlist> + </sect1> +</chapter>