Source of: /manual/en/intro.sem.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.sem.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'intro.sem.php',
1 => 'Introduction',
),
'up' =>
array (
0 => 'book.sem.php',
1 => 'Semaphore, Shared Memory and IPC',
),
'prev' =>
array (
0 => 'book.sem.php',
1 => 'Semaphore',
),
'next' =>
array (
0 => 'sem.setup.php',
1 => 'Installing/Configuring',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="intro.sem" class="preface">
<h1 class="title">Introduction</h1>
<p class="para">
This module provides wrappers for the System V IPC family of functions.
It includes semaphores, shared memory and inter-process messaging (IPC).
</p>
<p class="para">
Semaphores may be used to provide exclusive access to
resources on the current machine, or to limit the number of
processes that may simultaneously use a resource.
</p>
<p class="para">
This module provides also shared memory functions using System V
shared memory. Shared memory may be used to provide access to
global variables. Different httpd-daemons and even other programs
(such as Perl, C, ...) are able to access this data to provide a
global data-exchange. Remember, that shared memory is NOT safe
against simultaneous access. Use semaphores for synchronization.
</p><table class="doctable table">
<caption><b>Limits of Shared Memory by the Unix OS</b></caption>
<tbody valign="middle" class="tbody">
<tr valign="middle">
<td align="left">SHMMAX</td>
<td align="left">max size of shared memory, normally 131072 bytes</td>
</tr>
<tr valign="middle">
<td align="left">SHMMIN</td>
<td align="left">minimum size of shared memory, normally 1 byte</td>
</tr>
<tr valign="middle">
<td align="left">SHMMNI</td>
<td align="left">
max amount of shared memory segments on a system,
normally 100
</td>
</tr>
<tr valign="middle">
<td align="left">SHMSEG</td>
<td align="left">
max amount of shared memory segments per process, normally 6
</td>
</tr>
</tbody>
</table>
<p>
</p>
<p class="para">
The messaging functions may be used to send and receive messages to/from
other processes. They provide a simple and effective means of exchanging
data between processes, without the need for setting up an alternative
using Unix domain sockets.
</p>
<blockquote><p><b class="note">Note</b>: <span class="simpara">This extension is not
available on Windows platforms.</span></p></blockquote>
</div><?php manual_footer(); ?>