OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man7 / futex.7
index def5401..0777c66 100644 (file)
 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
 .\" Please send any bug reports, improvements, comments, patches,
 .\" etc. to Steve Cheng <steve@ggi-project.org>.
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright(C) 2003 Suzuki Takashi
-.\"         all rights reserved.
-.\" Translated Fri Oct 24 10:37:10 JST 2003
-.\"         by Suzuki Takashi.
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.\"WORD: contend                競合する
-.\"WORD: sleep                  起床待ちする
-.\"WORD: wake                   起床する
-.\"WORD: wake up                起床する
-.\"
-.TH FUTEX 7 2002-12-31 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\"*******************************************************************
+.TH FUTEX 7 2002\-12\-31 Linux "Linux Programmer's Manual"
 .SH 名前
-.\"O futex \- Fast Userspace Locking
-futex - 高速ユーザ空間ロック機構
-.\"O .SH SYNOPSIS
+futex \- 高速ユーザ空間ロック機構
 .SH 書式
 .nf
-.B #include <linux/futex.h>
+\fB#include <linux/futex.h>\fP
 .fi
-.\"O .SH DESCRIPTION
 .SH 説明
 .PP
-.\"O The Linux kernel provides futexes ("Fast Userspace muTexes")
-.\"O as a building block for fast userspace
-.\"O locking and semaphores.
-.\"O Futexes are very basic and lend themselves well for building higher level
-.\"O locking abstractions such as POSIX mutexes.
-Linux カーネルは、ユーザ空間で高速なロック機構やセマフォを使用するための
-基礎的要素として futex ("Fast Userspace muTexes"; 高速ユーザ空間 mutex) を
-提供している。
-futex は非常に基本的なもので、 POSIX mutex のような高度なロック機構の概念を
-構築するのに役立っている。
+Linux カーネルは、ユーザ空間で高速なロック機構やセマフォを使用するための 基礎的要素として futex ("Fast Userspace
+muTexes"; 高速ユーザ空間 mutex) を 提供している。 futex は非常に基本的なもので、 POSIX mutex
+のような高度なロック機構の概念を 構築するのに役立っている。
 .PP
-.\"O This page does not set out to document all design decisions
-.\"O but restricts itself to issues relevant for
-.\"O application and library development.
-.\"O Most programmers will in fact not be using futexes directly but
-.\"O instead rely on system libraries built on them,
-.\"O such as the NPTL pthreads implementation.
-このページはすべての設計決定を記述するようにはなっておらず、
-アプリケーションやライブラリの開発に関係することがらに限っている。
-実際にはプログラマの多くは直接は futex を扱わないが、その代わり
-futex に基づいて構築されたシステムライブラリ (例えば NPTL スレッド) に
-依存することになるだろう。
+このページはすべての設計決定を記述するようにはなっておらず、 アプリケーションやライブラリの開発に関係することがらに限っている。
+実際にはプログラマの多くは直接は futex を扱わないが、その代わり futex に基づいて構築されたシステムライブラリ (例えば NPTL
+スレッド) に 依存することになるだろう。
 .PP
-.\"O A futex is identified by a piece of memory which can be
-.\"O shared between different processes.
-.\"O In these different processes, it need not have identical addresses.
-.\"O In its bare form, a futex has semaphore semantics;
-.\"O it is a counter that can be incremented and decremented atomically;
-.\"O processes can wait for the value to become positive.
-futex は異なるプロセス間で共有することのできるメモリ片で識別される。
-これらの異なるプロセスでは、同じアドレスが付与されている必要はない。
-裸の姿では futex のセマンティクスはセマフォと同じである。
-futex は不可分操作で (atomically) インクリメントしたりデクリメントしたりできる
-カウンタで、プロセスは値が正になるのを待つことができる。
+futex は異なるプロセス間で共有することのできるメモリ片で識別される。 これらの異なるプロセスでは、同じアドレスが付与されている必要はない。
+裸の姿では futex のセマンティクスはセマフォと同じである。 futex は不可分操作で (atomically)
+インクリメントしたりデクリメントしたりできる カウンタで、プロセスは値が正になるのを待つことができる。
 .PP
-.\"O Futex operation is entirely userspace for the noncontended case.
-.\"O The kernel is only involved to arbitrate the contended case.
-.\"O As any sane design will strive for noncontention,
-.\"O futexes are also optimized for this situation.
-futex の操作は、競合がない場合には完全にユーザ空間で行なわれる。
-カーネルは競合が起こった場合の仲裁に関与するだけである。
-良識ある設計では競合が起こらないよう努力するが、
-futex も競合状態に関して最適化されている。
+futex の操作は、競合がない場合には完全にユーザ空間で行なわれる。 カーネルは競合が起こった場合の仲裁に関与するだけである。
+良識ある設計では競合が起こらないよう努力するが、 futex も競合状態に関して最適化されている。
 .PP
-.\"O In its bare form, a futex is an aligned integer which is
-.\"O only touched by atomic assembler instructions.
-.\"O Processes can share this integer using
-.\"O .BR mmap (2),
-.\"O via shared memory segments or because they share memory space,
-.\"O in which case the application is commonly called multithreaded.
-裸の姿では、 futex は不可分なアセンブリ命令でのみ操作される
-アラインメントの揃った int 型の変数である。
-複数のプロセスはこの int 型変数を、
-.BR mmap (2)
-を用いるか、
-共有メモリセグメントを介するか、
-メモリ空間を共有する (この場合、
+裸の姿では、 futex は不可分なアセンブリ命令でのみ操作される アラインメントの揃った int 型の変数である。 複数のプロセスはこの int
+型変数を、 \fBmmap\fP(2)  を用いるか、 共有メモリセグメントを介するか、 メモリ空間を共有する (この場合、
 アプリケーションは一般的にマルチ・スレッドであると呼ばれる) か方法で共有する。
-.\"O .SS "Semantics"
-.SS "セマンティクス"
+.SS セマンティクス
 .PP
-.\"O Any futex operation starts in userspace,
-.\"O but it may necessary to communicate with the kernel using the
-.\"O .BR futex (2)
-.\"O system call.
-futex の操作はすべてユーザ空間から始まるが、必要に応じて
-.BR futex (2)
-システムコールを用いてカーネルと通信する。
+futex の操作はすべてユーザ空間から始まるが、必要に応じて \fBfutex\fP(2)  システムコールを用いてカーネルと通信する。
 .PP
-.\"O To "up" a futex, execute the proper assembler instructions that
-.\"O will cause the host CPU to atomically increment the integer.
-.\"O Afterward, check if it has in fact changed from 0 to 1, in which case
-.\"O there were no waiters and the operation is done.
-.\"O This is the noncontended case which is fast and should be common.
-futex を "up" するには、
-ホスト CPU に対し int 型変数を不可分操作でインクリメントするような、
-適切なアセンブリ命令を実行する。
-そのあと、実際に 0 から 1 に変化したかどうかをチェックし、
-変化していれば待ちプロセス (waiter) はないということであり、操作は完了する。
+futex を "up" するには、 ホスト CPU に対し int 型変数を不可分操作でインクリメントするような、 適切なアセンブリ命令を実行する。
+そのあと、実際に 0 から 1 に変化したかどうかをチェックし、 変化していれば待ちプロセス (waiter) はないということであり、操作は完了する。
 これは競合のない場合であり、高速でよく起こるはずである。
 .PP
-.\"O In the contended case, the atomic increment changed the counter
-.\"O from \-1  (or some other negative number).
-.\"O If this is detected, there are waiters.
-.\"O Userspace should now set the counter to 1 and instruct the
-.\"O kernel to wake up any waiters using the
-.\"O .B FUTEX_WAKE
-.\"O operation.
 競合がある場合、不可分操作のインクリメントでカウンタは \-1 (または他の負の数)
-から変化する。これが検出されると、待ちプロセスがあるということである。
-ユーザ空間ではカウンタを 1 に設定し、
-.B FUTEX_WAKE
+から変化する。これが検出されると、待ちプロセスがあるということである。 ユーザ空間ではカウンタを 1 に設定し、 \fBFUTEX_WAKE\fP
 を用いてカーネルに待ちプロセスを wake (起床) させるよう指示する。
 .PP
-.\"O Waiting on a futex, to "down" it, is the reverse operation.
-.\"O Atomically decrement the counter and check if it changed to 0,
-.\"O in which case the operation is done and the futex was uncontended.
-.\"O In all other circumstances, the process should set the counter to \-1
-.\"O and request that the kernel wait for another process to up the futex.
-.\"O This is done using the
-.\"O .B FUTEX_WAIT
-.\"O operation.
-futex の獲得を待つ、すなわち futex を "down" するには反対の操作を行なう。
-不可分操作でカウンタをデクリメントし、カウンタが 0 に変化したかどうかを
-チェックする。変化していれば操作は完了し futex は競合していないということである。
-0 にならなかった場合、プロセスはカウンタを \-1 に設定し、
-他のプロセスがその futex を up するのを待つようカーネルに要求しなければならない。
-これは
-.B FUTEX_WAIT
-を行なうことで実現される。
+futex の獲得を待つ、すなわち futex を "down" するには反対の操作を行なう。 不可分操作でカウンタをデクリメントし、カウンタが 0
+に変化したかどうかを チェックする。変化していれば操作は完了し futex は競合していないということである。 0
+にならなかった場合、プロセスはカウンタを \-1 に設定し、 他のプロセスがその futex を up するのを待つようカーネルに要求しなければならない。
+これは \fBFUTEX_WAIT\fP を行なうことで実現される。
 .PP
-.\"O The
-.\"O .BR futex (2)
-.\"O system call can optionally be passed a timeout specifying how long
-.\"O the kernel should
-.\"O wait for the futex to be upped.
-.\"O In this case, semantics are more complex and the programmer is referred
-.\"O to
-.\"O .BR futex (2)
-.\"O for
-.\"O more details.
-.\"O The same holds for asynchronous futex waiting.
-.BR futex (2)
-システムコールには、省略可能な引数としてタイムアウトを渡すことができ、
-カーネルはその futex が up されるのをどれくらいの期間待つべきかを
-指定することができる。この場合、セマンティクスはもっと複雑になるため、
-より詳細な情報を得るにはプログラマは
-.BR futex (2)
-を参照すること。
-同じページに非同期の futex 待ちについても記されている。
-.\"O .SH "VERSIONS"
+\fBfutex\fP(2)  システムコールには、省略可能な引数としてタイムアウトを渡すことができ、 カーネルはその futex が up
+されるのをどれくらいの期間待つべきかを 指定することができる。この場合、セマンティクスはもっと複雑になるため、 より詳細な情報を得るにはプログラマは
+\fBfutex\fP(2)  を参照すること。 同じページに非同期の futex 待ちについても記されている。
 .SH バージョン
 .PP
-.\"O Initial futex support was merged in Linux 2.5.7
-.\"O but with different semantics from those described above.
-.\"O Current semantics are available from Linux 2.5.40 onward.
-最初の futex 対応は Linux 2.5.7 で組み込まれたが、
-上記のセマンティクスとは異なる。
-現在のセマンティクスは Linux 2.5.40 以降で利用可能である。
-.\"O .SH "NOTES"
+最初の futex 対応は Linux 2.5.7 で組み込まれたが、 上記のセマンティクスとは異なる。 現在のセマンティクスは Linux
+2.5.40 以降で利用可能である。
 .SH 注意
 .PP
-.\"O To reiterate, bare futexes are not intended as an easy to use
-.\"O abstraction for end-users.
-.\"O Implementors are expected to be assembly literate and to have read
-.\"O the sources of the futex userspace library referenced
-.\"O below.
-再び繰り返しておくが、裸の futex はエンドユーザが容易に使える概念として
-意図されたものではない。
-実装者は、アセンブリ言語に慣れており、以下に挙げる futex ユーザ空間ライブラリの
-ソースを読み終えていることが要求される。
+再び繰り返しておくが、裸の futex はエンドユーザが容易に使える概念として 意図されたものではない。
+実装者は、アセンブリ言語に慣れており、以下に挙げる futex ユーザ空間ライブラリの ソースを読み終えていることが要求される。
 .PP
-.\"O This man page illustrates the most common use of the
-.\"O .BR futex (2)
-.\"O primitives: it is by no means the only one.
-このマニュアルページには
-.BR futex (2)
-プリミティブの最も一般的な使用法が
-記されている。これは決して唯一の使用法ではない。
-.\"O .\" .SH "AUTHORS"
-.\" .SH 著者
+.\" .SH "AUTHORS"
 .\" .PP
-.\"O .\" Futexes were designed and worked on by Hubertus Franke
-.\"O .\" (IBM Thomas J. Watson Research Center),
-.\"O .\" Matthew Kirkwood, Ingo Molnar (Red Hat) and
-.\"O .\" Rusty Russell (IBM Linux Technology Center).
-.\"O .\" This page written by bert hubert.
-.\" futex は Hubertus Franke (IBM Thomas J. Watson Research Center) と
-.\" Matthew Kirkwood 、 Ingo Molnar (Red Hat) 、
-.\" Rusty Russell (IBM Linux Technology Center) が設計し、検討した。
-.\" このページは bert hubert が記した。
-.\"O .SH "SEE ALSO"
+.\" Futexes were designed and worked on by Hubertus Franke
+.\" (IBM Thomas J. Watson Research Center),
+.\" Matthew Kirkwood, Ingo Molnar (Red Hat) and
+.\" Rusty Russell (IBM Linux Technology Center).
+.\" This page written by bert hubert.
+このマニュアルページには \fBfutex\fP(2)  プリミティブの最も一般的な使用法が 記されている。これは決して唯一の使用法ではない。
 .SH 関連項目
-.BR futex (2)
+\fBfutex\fP(2)
 .PP
-.\"O .IR "Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux"
-.\"O (proceedings of the Ottawa Linux Symposium 2002),
-.\"O futex example library, futex-*.tar.bz2
-.\"O <URL:ftp://ftp.kernel.org/pub/linux/kernel/people/rusty/>.
-.IR "Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux"
-(proceedings of the Ottawa Linux Symposium 2002),
-futex の使用例ライブラリ, futex-*.tar.bz2
+\fIFuss, Futexes and Furwocks: Fast Userlevel Locking in Linux\fP (proceedings
+of the Ottawa Linux Symposium 2002), futex の使用例ライブラリ, futex\-*.tar.bz2
 <URL:ftp://ftp.kernel.org/pub/linux/kernel/people/rusty/>.