OSDN Git Service

Update draft for LDP 3.67
[linuxjm/LDP_man-pages.git] / draft / man7 / shm_overview.7
index 0288adc..01131dd 100644 (file)
@@ -1,9 +1,8 @@
-'\" t
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
+.\" t
 .\" Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk
 .\" <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
 .\"
 .\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
 .\"         all rights reserved.
 .\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
 .\"
-.TH SHM_OVERVIEW 7 2010-09-10 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O shm_overview \- Overview of POSIX shared memory
-shm_overview \- POSIX ¶¦Í­¥á¥â¥ê¤Î³µÍ×
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The POSIX shared memory API allows processes to communicate information
-.\"O by sharing a region of memory.
-POSIX ¶¦Í­¥á¥â¥ê API ¤ò»ÈÍѤ¹¤ë¤È¡¢¥á¥â¥ê¤Î¤¢¤ëÎΰè¤ò¶¦Í­¤·¤Æ¡¢
-¥×¥í¥»¥¹´Ö¤Ç¾ðÊó¤ò¤ä¤ê¼è¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
+.TH SHM_OVERVIEW 7 2010\-09\-10 Linux "Linux Programmer's Manual"
+.SH 名前
+shm_overview \- POSIX 共有メモリの概要
+.SH 説明
+POSIX 共有メモリ API を使用すると、メモリのある領域を共有して、 プロセス間で情報をやり取りすることができる。
 
-.\"O The interfaces employed in the API are:
-¤³¤Î API ¤Ç¤Ï°Ê²¼¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤¬ºÎÍѤµ¤ì¤Æ¤¤¤ë¡£
-.TP 15
-.BR shm_open (3)
-.\"O Create and open a new object, or open an existing object.
-.\"O This is analogous to
-.\"O .BR open (2).
-.\"O The call returns a file descriptor for use by the other
-.\"O interfaces listed below.
-¿·¤·¤¤¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¥ª¡¼¥×¥ó¤¹¤ë¡¢¤â¤·¤¯¤Ï
-´û¸¤Î¥ª¥Ö¥¸¥§¥¯¥È¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£¤³¤ì¤Ï
-.BR open (2)
-¤ÈƱ¤¸¤Ç¤¢¤ë¡£²¼µ­¤Ë¤¢¤ë¾¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç»ÈÍѤ¹¤ë
-¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
-.TP
-.BR ftruncate (2)
-.\"O Set the size of the shared memory object.
-.\"O (A newly created shared memory object has a length of zero.)
-¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤ÎÂ礭¤µ¤òÀßÄꤹ¤ë¡£
-.TP
-.BR mmap (2)
-.\"O Map the shared memory object into the virtual address space
-.\"O of the calling process.
-¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î²¾ÁÛ¥¢¥É¥ì¥¹¶õ´Ö¤Ë¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤ò
-¥Þ¥Ã¥×¤¹¤ë¡£
-.TP
-.BR munmap (2)
-.\"O Unmap the shared memory object from the virtual address space
-.\"O of the calling process.
-¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î²¾ÁÛ¥¢¥É¥ì¥¹¶õ´Ö¤«¤é
-¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¢¥ó¥Þ¥Ã¥×¤¹¤ë¡£
-.TP
-.BR shm_unlink (3)
-.\"O Remove a shared memory object name.
-¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È̾¤òºï½ü¤¹¤ë¡£
-.TP
-.BR close (2)
-.\"O Close the file descriptor allocated by
-.\"O .BR shm_open (3)
-.\"O when it is no longer needed.
-.BR shm_open (3)
-¤Ç³ä¤êÅö¤Æ¤é¤ì¤¿¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬ÉÔÍפˤʤ俺ݤˡ¢
-¤½¤Î¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¥¯¥í¡¼¥º¤¹¤ë¡£
-.TP
-.BR fstat (2)
-.\"O Obtain a
-.\"O .I stat
-.\"O structure that describes the shared memory object.
-.\"O Among the information returned by this call are the object's
-.\"O size
-.\"O .RI ( st_size ),
-.\"O permissions
-.\"O .RI ( st_mode ),
-.\"O owner
-.\"O .RI ( st_uid ),
-.\"O and group
-.\"O .RI ( st_gid ).
-¤½¤Î¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤¬Æþ¤Ã¤¿
-.I stat
-¹½Â¤ÂΤò¼èÆÀ¤¹¤ë¡£
-¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬ÊÖ¤¹¾ðÊó¤Ë¤Ï¡¢¥ª¥Ö¥¸¥§¥¯¥È¤Î¥µ¥¤¥º
-.RI ( st_size )¡¢
-µö²Ä°À­
-.RI ( st_mode )¡¢
-½êÍ­¼Ô
-.RI ( st_uid )¡¢
-¥°¥ë¡¼¥×
-.RI ( st_gid )
-¤¬¤¢¤ë¡£
-.TP
-.BR fchown (2)
-.\"O To change the ownership of a shared memory object.
-¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤Î½êÍ­¸¢¤òÊѹ¹¤¹¤ë¡£
-.TP
-.BR fchmod (2)
-.\"O To change the permissions of a shared memory object.
-¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤Îµö²Ä°À­¤òÊѹ¹¤¹¤ë¡£
-.\"O .SS Versions
-.SS ¥Ð¡¼¥¸¥ç¥ó
-.\"O POSIX shared memory is supported since Linux 2.4 and glibc 2.2.
-POSIX ¶¦Í­¥á¥â¥ê¤Ï Linux 2.4 ¤È glibc 2.2 °Ê¹ß¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O .SS Persistence
-.SS »ý³À­
-.\"O POSIX shared memory objects have kernel persistence:
-.\"O a shared memory object will exist until the system is shut down,
-.\"O or until all processes have unmapped the object and it has been deleted with
-.\"O .BR shm_unlink (3)
-POSIX ¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥«¡¼¥Í¥ëÆâ¤ÇÊÝ»ý¤µ¤ì¤ë¡£
-¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤Ï¡¢¥·¥¹¥Æ¥à¤¬¥·¥ã¥Ã¥È¥À¥¦¥ó¤µ¤ì¤ë¤«¡¢
-Á´¤Æ¤Î¥×¥í¥»¥¹¤¬¤½¤Î¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¢¥ó¥Þ¥Ã¥×¤·¡¢
-.BR shm_unlink (3)
-¤Çºï½ü¤µ¤ì¤ë¤Þ¤Ç¡¢Â¸ºß¤·Â³¤±¤ë¡£
-.\"O .SS Linking
-.SS ¥ê¥ó¥¯
-.\"O Programs using the POSIX shared memory API must be compiled with
-.\"O .I cc \-lrt
-.\"O to link against the real-time library,
-.\"O .IR librt .
-POSIX ¶¦Í­¥á¥â¥ê API ¤ò»ÈÍѤ·¤¿¥×¥í¥°¥é¥à¤Ï
-.I cc \-lrt
-¤Ç¥³¥ó¥Ñ¥¤¥ë¤·¡¢¥ê¥¢¥ë¥¿¥¤¥à¥é¥¤¥Ö¥é¥ê
-.I librt
-¤È¥ê¥ó¥¯¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\"O .SS Accessing shared memory objects via the file system
-.SS ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à·Ðͳ¤Ç¤Î¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥¢¥¯¥»¥¹
-.\"O On Linux, shared memory objects are created in a
-.\"O .RI ( tmpfs )
-.\"O virtual file system, normally mounted under
-.\"O .IR /dev/shm .
-.\"O Since kernel 2.6.19, Linux supports the use of access control lists (ACLs)
-.\"O to control the permissions of objects in the virtual file system.
-Linux ¤Ç¤Ï¡¢¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤ÏÄ̾ï
-.I /dev/shm
-°Ê²¼¤Ë¥Þ¥¦¥ó¥È¤µ¤ì¤ë²¾ÁÛ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à
-.RI ( tmpfs )
-Æâ¤ËºîÀ®¤µ¤ì¤ë¡£
-¥«¡¼¥Í¥ë 2.6.19 °Ê¹ß¤Î Linux ¤Ç¤Ï¡¢
-²¾ÁÛ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥àÆâ¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Îµö²Ä°À­¤ÎÀ©¸æ¤Ë¡¢
-¥¢¥¯¥»¥¹À©¸æ¥ê¥¹¥È (ACL; access control lists) ¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤ë¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-POSIX.1-2001.
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O Typically, processes must synchronize their access to a shared
-.\"O memory object, using, for example, POSIX semaphores.
-Ä̾ï¤Ï¡¢¶¦Í­¥á¥â¥ê¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥¢¥¯¥»¥¹¤¹¤ë¥×¥í¥»¥¹¤Ï¡¢
-POSIX ¥»¥Þ¥Õ¥©¤Ê¤É¤ò»È¤Ã¤Æ¥×¥í¥»¥¹´Ö¤ÇƱ´ü¤ò¤È¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+この API では以下のインターフェースが採用されている。
+.TP  15
+\fBshm_open\fP(3)
+新しいオブジェクトを生成しオープンする、もしくは 既存のオブジェクトをオープンする。これは \fBopen\fP(2)
+と同じである。下記にある他のインターフェースで使用する ファイルディスクリプタを返す。
+.TP 
+\fBftruncate\fP(2)
+共有メモリオブジェクトの大きさを設定する。
+.TP 
+\fBmmap\fP(2)
+呼び出したプロセスの仮想アドレス空間に共有メモリオブジェクトを マップする。
+.TP 
+\fBmunmap\fP(2)
+呼び出したプロセスの仮想アドレス空間から 共有メモリオブジェクトをアンマップする。
+.TP 
+\fBshm_unlink\fP(3)
+共有メモリオブジェクト名を削除する。
+.TP 
+\fBclose\fP(2)
+\fBshm_open\fP(3)  で割り当てられたファイルディスクリプタが不要になった際に、 そのファイルディスクリプタをクローズする。
+.TP 
+\fBfstat\fP(2)
+その共有メモリオブジェクトについての情報が入った \fIstat\fP 構造体を取得する。 このシステムコールが返す情報には、オブジェクトのサイズ
+(\fIst_size\fP)、 許可属性 (\fIst_mode\fP)、 所有者 (\fIst_uid\fP)、 グループ (\fIst_gid\fP)  がある。
+.TP 
+\fBfchown\fP(2)
+共有メモリオブジェクトの所有権を変更する。
+.TP 
+\fBfchmod\fP(2)
+共有メモリオブジェクトの許可属性を変更する。
+.SS Versions
+POSIX 共有メモリは Linux 2.4 と glibc 2.2 以降でサポートされている。
+.SS 持続性
+POSIX 共有メモリオブジェクトはカーネル内で保持される。 共有メモリオブジェクトは、システムがシャットダウンされるか、
+全てのプロセスがそのオブジェクトをアンマップし、 \fBshm_unlink\fP(3)  で削除されるまで、存在し続ける。
+.SS リンク
+POSIX 共有メモリ API を使用したプログラムは \fIcc \-lrt\fP でコンパイルし、リアルタイムライブラリ \fIlibrt\fP
+とリンクしなければならない。
+.SS ファイルシステム経由での共有メモリオブジェクトへのアクセス
+Linux では、共有メモリオブジェクトは通常 \fI/dev/shm\fP 以下にマウントされる仮想ファイルシステム (\fItmpfs\fP)
+内に作成される。 カーネル 2.6.19 以降の Linux では、 仮想ファイルシステム内のオブジェクトの許可属性の制御に、 アクセス制御リスト
+(ACL; access control lists) を使うことができる。
+.SH 準拠
+POSIX.1\-2001.
+.SH 注意
+通常は、共有メモリオブジェクトにアクセスするプロセスは、 POSIX セマフォなどを使ってプロセス間で同期をとらなければならない。
 
-.\"O System V shared memory
-.\"O .RB ( shmget (2),
-.\"O .BR shmop (2),
-.\"O etc.) is an older shared memory API.
-.\"O POSIX shared memory provides a simpler, and better designed interface;
-.\"O on the other hand POSIX shared memory is somewhat less widely available
-.\"O (especially on older systems) than System V shared memory.
-System V ¶¦Í­¥á¥â¥ê
-.RB ( shmget (2),
-.BR shmop (2)
-¤Ê¤É) ¤Ï¸Å¤¤¶¦Í­¥á¥â¥ê API ¤Ç¤¢¤ë¡£
-POSIX ¶¦Í­¥á¥â¥ê¤Ï¡¢¤è¤ê´Êñ¤Ç¡¢¤¦¤Þ¤¯À߷פµ¤ì¤¿¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤òÄ󶡤·¤Æ¤¤¤ë¡£
-°ìÊý¤Ç¡¢POSIX ¶¦Í­¥á¥â¥ê¤Ï System V ¶¦Í­¥á¥â¥ê¤ÈÈæ¤Ù¤ë¤È
-ÍøÍѤǤ­¤ë¥·¥¹¥Æ¥à¤¬¾¯¤Ê¤¤ (Æäˡ¢¸Å¤¤¥·¥¹¥Æ¥à¤Ç¤Ï¾¯¤Ê¤¤)¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR fchmod (2),
-.BR fchown (2),
-.BR fstat (2),
-.BR ftruncate (2),
-.BR mmap (2),
-.BR mprotect (2),
-.BR munmap (2),
-.BR shmget (2),
-.BR shmop (2),
-.BR shm_open (3),
-.BR shm_unlink (3),
-.BR sem_overview (7)
+System V 共有メモリ (\fBshmget\fP(2), \fBshmop\fP(2)  など) は古い共有メモリ API である。 POSIX
+共有メモリは、より簡単で、うまく設計されたインタフェースを提供している。 一方で、POSIX 共有メモリは System V 共有メモリと比べると
+利用できるシステムが少ない (特に、古いシステムでは少ない)。
+.SH 関連項目
+\fBfchmod\fP(2), \fBfchown\fP(2), \fBfstat\fP(2), \fBftruncate\fP(2), \fBmmap\fP(2),
+\fBmprotect\fP(2), \fBmunmap\fP(2), \fBshmget\fP(2), \fBshmop\fP(2), \fBshm_open\fP(3),
+\fBshm_unlink\fP(3), \fBsem_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。