Shared Memory Article Index for
Shared
Shopping
Shared
Articles about
Shared Memory
Website Links For
Shared
 

Information About

Shared Memory




In computer hardware, shared memory refers to a (typically) large block of Random Access Memory that can be accessed by several different Central Processing Unit s (CPUs) in a Multiple-processor Computer System .

A shared memory system is relatively easy to program since all processors share a single view of data and the communication between processors can be as fast as memory accesses to a same location.

The issue with shared memory systems is that many CPUs need fast access to memory and will likely Cache memory, which has two complications:
  • CPU-to-memory connection becomes a bottleneck. Shared memory computers can not scale very well. Most of them have only ten processors.

  • and Memory Coherence ). Such coherence protocols can, when they work well, provide extremely high performance access to shared information between multiple processors. On the other hand they can sometimes become overloaded and become a bottleneck to performance.


The alternatives to shared memory are Distributed Memory and Distributed Shared Memory , with another, similar set of issues. See also Non-Uniform Memory Access .


IN SOFTWARE

In computer software, ''shared memory'' is a method of Inter-process Communication (IPC), i.e. a way of exchanging data between programs running at the same time. One Process will create an area in RAM which other processes can access.

Since both processes can access the shared memory area like regular working memory, this is a very fast way of communication (as opposed to other mechanisms of IPC such as Named Pipe s, Unix Socket s or CORBA ). On the other hand, it is less powerful, as for example the communicating processes must be running on the same machine (whereas other IPC methods can use a Computer Network ).

IPC by shared memory is mainly used on Unix systems.

POSIX provides a standardized API for using shared memory, ''POSIX Shared Memory''. This uses the function shm_open from sys/mman.h.

Unix System 5 provides an API for shared memory as well. This uses shmget from sys/shm.h.

BSD systems provide "anonymous mapped memory" which can be used by several processes.


SEE ALSO



EXTERNAL LINKS