Shared Memory

What Does Shared Memory Mean?

Shared memory for software is a type of memory that can be shared by multiple applications or processes with the intent of providing inter-application communication or avoid redundant data copies. This is an efficient means of sharing or passing data because it removes the need to use other process like input/output (I/O). One application saves the data in shared memory, while another application may use it when found.

Advertisements

In the context of processors, shared memory is a part of random access memory (RAM) that can be accessed by all the processors in a multi-processor system.

Techopedia Explains Shared Memory

Shared memory for software is a way for different programs to communicate and pass data without more overhead from communications processes. With shared memory, one program writes to the shared memory any data it needs another program to receive.

For example, if Program A wants to give a list to Program B, it saves the data in shared memory and marks it with a semaphore or other flagging system to signal that it is ready to be read by Program B.

When Program B finds the file, it checks the semaphore to see if it is allowed to touch that file. If allowed, then it does what it needs to do to the file, puts it in shared memory or updates it. It also updates the semaphore, so that Program A knows that it should take the file.

In terms of hardware, specifically microprocessors, shared memory is a large block of RAM used by multiple processors. It is easy to program because all processors share the same view of data, facilitating faster communication. However, this can get complicated because processors cache memory for faster access, which can lead to problems like cache coherence.

Advertisements

Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…