Shared Memory
PHP offers an extension for using System V shared memory. It follows the same restrictions as the System V semaphore functions, above. That is, your operating system must support this functionality. Solaris, Linux, and AIX are known to work with shared memory.
Shared memory is virtual memory shared by separate processes. It helps solve the problem of communication between processes running on the same machine. An obvious method might be to write information to a file, but access to permanent storage is relatively slow. Shared memory allows the creation of system memory that may be accessed by multiple processes, which is much faster. Since exclusive use of this memory is essential, you must use some sort of locking. This is usually ...
Get Core PHP Programming: Using PHP to Build Dynamic Web Sites now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.