Shared memory is the second of the three IPC facilities. It allows two unrelated processes to access the same logical memory. Shared memory is a very efficient way of transferring data between two running processes. Although the X Open standard doesn't require it, it's probable that most implementations of shared memory arrange for the memory being shared between different processes to be the same physical memory.
Shared memory is a special range of addresses that is created by IPC for one process and appears in the address space of that process. Other processes can then attach the same shared memory segment into their own address space. All processes can access the memory locations just as if the memory had been allocated by malloc. If one process writes to this shared memory, the changes immediately become visible to any other process that has access to the same shared memory.
Shared memory provides an efficient way of sharing and passing data between multiple processes. By itself, shared memory doesn't provide any synchronization facilities. Because it provides no synchronization facilities, you usually need to use some other mechanism to synchronize access to the shared memory. Typically, you might use shared memory to provide efficient access to large areas of memory and pass small messages.
To synchronize access to that memory, there are no automatic facilities to prevent a second process from padding to read the shared memory before the first process has finished writing to it. It's the responsibility of the programmers to synchronize access.