shared memory definition
1. Memory in a parallel computer
, usually RAM
, which can be accessed by more than one processor, usually via a shared bus
It usually takes longer for a processor to access shared memory than to access its own private memory because of contention for the processor-to-memory connections and because of other overheads associated with ensuring synchronised access. Computers using shared memory usually have some kind of local cache
on each processor to reduce the number of accesses to shared memory. This requires a cache consistency protocol
to ensure that one processor's cached copy of a shared memory location is invalidated when another processor writes to that location.
The alternative to shared memory is message passing
where all memory is private to some particular processor and processors communicate by sending messages down special links. This is usually slower than shared memory but it avoids the problems of contention for memory and can be implemented more cheaply.
2. Memory which can be access by more than one process in a multitasking operating system
with memory protection. Some Unix
variants, e.g. SunOS
provide this kind of shared memory.
Unix manual pages: shmop(2), shmctl(2), shmget(2).