Epstein Files Full PDF

CLICK HERE
Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
teknopedia

  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
Flag Counter
  1. World Encyclopedia
  2. Shared memory - Wikipedia
Shared memory - Wikipedia
From Wikipedia, the free encyclopedia
Not to be confused with Overlay (programming) or Overlapping code.
Computer memory that can be accessed by multiple processes
icon
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Shared memory" – news · newspapers · books · scholar · JSTOR
(September 2025) (Learn how and when to remove this message)
An illustration of a shared memory system of three processors

In computer science, shared memory is memory that may be simultaneously accessed by multiple programs with an intent to provide communication among them or avoid redundant copies. Shared memory is an efficient means of passing data between programs. Depending on context, programs may run on a single processor or on multiple separate processors.

Using memory for communication inside a single program, e.g. among its multiple threads, is also referred to as shared memory.

In hardware

[edit]
HSA defines a special case of memory sharing, where the MMU of the CPU and the IOMMU of the GPU have an identical pageable virtual address space.

In computer hardware, shared memory refers to a (typically large) block of random access memory (RAM) that can be accessed by several different central processing units (CPUs) in a multiprocessor computer system.

Shared memory systems may use:[1]

  • uniform memory access (UMA): all the processors share the physical memory uniformly;
  • non-uniform memory access (NUMA): memory access time depends on the memory location relative to a processor;
  • cache-only memory architecture (COMA): the local memories for the processors at each node is used as cache instead of as actual main memory.

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 the 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:

  • access time degradation: when several processors try to access the same memory location it causes contention. Trying to access nearby memory locations may cause false sharing. Shared memory computers cannot scale very well. Most of them have ten or fewer processors;
  • lack of data coherence: whenever one cache is updated with information that may be used by other processors, the change needs to be reflected to the other processors, otherwise the different processors will be working with incoherent data. Such cache 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.

Technologies like crossbar switches, Omega networks, HyperTransport or front-side bus can be used to dampen the bottleneck-effects.

In case of a Heterogeneous System Architecture (processor architecture that integrates different types of processors, such as CPUs and GPUs, with shared memory), the memory management unit (MMU) of the CPU and the input–output memory management unit (IOMMU) of the GPU have to share certain characteristics, like a common address space.

The alternatives to shared memory are distributed memory and distributed shared memory, each having a similar set of issues.

In software

[edit]

In computer software, shared memory is either

  • 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;
  • a method of conserving memory space by directing accesses to what would ordinarily be copies of a piece of data to a single instance instead, by using virtual memory mappings or with explicit support of the program in question. This is most often used for shared libraries and for Execute in place (XIP).

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 pipes, Unix domain sockets or CORBA). On the other hand, it is less scalable, as for example the communicating processes must be running on the same machine (of other IPC methods, only Internet domain sockets—not Unix domain sockets—can use a computer network), and care must be taken to avoid issues if processes sharing memory are running on separate CPUs and the underlying architecture is not cache coherent.

IPC by shared memory is used for example to transfer images between the application and the X server on Unix systems, or inside the IStream object returned by CoMarshalInterThreadInterfaceInStream in the COM libraries under Windows.

Dynamic libraries are generally held in memory once and mapped to multiple processes, and only pages that had to be customized for the individual process (because a symbol resolved differently there) are duplicated, usually with a mechanism known as copy-on-write that transparently copies the page when a write is attempted, and then lets the write succeed on the private copy.

Compared to multiple address space operating systems, memory sharing -- especially of sharing procedures or pointer-based structures -- is simpler in single address space operating systems.[2]

Support on Unix-like systems

[edit]

POSIX provides a standardized API for using shared memory, POSIX Shared Memory. This uses the function shm_open from sys/mman.h.[3] POSIX interprocess communication (part of the POSIX:XSI Extension) includes the shared-memory functions shmat, shmctl, shmdt and shmget.[4][5] Unix System V 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.

The shared memory created by shm_open is persistent. It stays in the system until explicitly removed by a process. This has a drawback in that if the process crashes and fails to clean up shared memory it will stay until system shutdown; that limitation is not present in an Android-specific implementation dubbed ashmem.[6]

POSIX also provides the mmap API for mapping files into memory; a mapping can be shared, allowing the file's contents to be used as shared memory.

Linux distributions based on the 2.6 kernel and later offer /dev/shm as shared memory in the form of a RAM disk, more specifically as a world-writable directory (a directory in which every user of the system can create files) that is stored in memory. Both the RedHat and Debian based distributions include it by default. Support for this type of RAM disk is completely optional within the kernel configuration file.[7]

Support on Windows

[edit]

On Windows, one can use CreateFileMapping and MapViewOfFile functions to map a region of a file into memory in multiple processes.[8]

Cross-platform support

[edit]

Some C++ libraries provide a portable and object-oriented access to shared memory functionality. For example, Boost contains the Boost.Interprocess C++ Library[9] and Qt provides the QSharedMemory class.[10]

Programming language support

[edit]

For programming languages with POSIX bindings (say, C/C++), shared memory regions can be created and accessed by calling the functions provided by the operating system. Other programming languages may have their own ways of using these operating facilities for similar effect. For example, PHP provides an API to create shared memory, similar to POSIX functions.[11]

See also

[edit]
  • Distributed memory
  • Distributed shared memory
  • Shared graphics memory
  • Heterogeneous System Architecture
  • Global variable
  • Nano-threads
  • Execute in place
  • Shared register
  • Shared snapshot objects
  • Von Neumann Architecture Bottleneck

References

[edit]
  1. ^ El-Rewini, Hesham; Abd-El-Barr, Mostafa (2005). Advanced Computer Architecture and Parallel Processing. Wiley-Interscience. pp. 77–80. ISBN 978-0-471-46740-3.
  2. ^ Jeffrey S. Chase; Henry M. Levy; Michael J. Feeley; and Edward D. Lazowska. "Sharing and Protection in a Single Address Space Operating System". doi:10.1145/195792.195795 1993. p. 3
  3. ^ Documentation of shm_open from the Single Unix Specification
  4. ^ Robbins, Kay A.; Robbins, Steven (2003). Unix systems programming: communication, concurrency, and threads (2 ed.). Prentice Hall PTR. p. 512. ISBN 978-0-13-042411-2. Retrieved 2011-05-13. The POSIX interprocess communication (IPC) is part of the POSIX:XSI Extension and has its origin in Unix System V interprocess communication.
  5. ^ Shared memory facility from the Single Unix Specification.
  6. ^ "Android Kernel Features". elinux.org. Retrieved 12 Dec 2022.
  7. ^ Christoph Rohland; Hugh Dickins; KOSAKI Motohiro. "tmpfs.txt". kernel.org. Retrieved 2010-03-16.
  8. ^ Creating Named Shared Memory from MSDN.
  9. ^ Boost.Interprocess C++ Library
  10. ^ "QSharedMemory Class Reference".
  11. ^ Shared Memory Functions in PHP-API

External links

[edit]
  • IPC:Shared Memory by Dave Marshall
  • Shared Memory Introduction, Ch. 12 from book by Richard Stevens "UNIX Network Programming, Volume 2, Second Edition: Interprocess Communications".
  • SharedHashFile, An open source, shared memory hash table.
  • v
  • t
  • e
Inter-process communication
Data exchange among threads in computer programs
Methods
  • File
  • Memory-mapped file
  • Message passing
  • Message queue and mailbox
  • Named pipe
  • Anonymous pipe
  • Pipe
  • Semaphore
  • Shared memory
  • Signal
  • Sockets
    • Network
    • Unix
Protocols
and standards
  • Apple events
  • COM+
  • CORBA
  • D-Bus
  • DDS
  • DCE
  • ICE
  • OpenBinder
  • Sun RPC
  • POSIX (various methods)
  • SOAP
  • REST
  • Thrift
  • TIPC
  • XML-RPC
Software libraries
and frameworks
  • D-Bus
  • libevent
  • SIMPL
  • LINX
  • v
  • t
  • e
Parallel computing
General
  • Distributed computing
  • Parallel computing
  • Parallel algorithm
  • Massively parallel
  • Cloud computing
  • High-performance computing
  • Multiprocessing
  • Manycore processor
  • GPGPU
  • Computer network
  • Systolic array
Levels
  • Bit
  • Instruction
  • Thread
  • Task
  • Data
  • Memory
  • Loop
  • Pipeline
Multithreading
  • Temporal
  • Simultaneous (SMT)
  • Simultaneous and heterogenous
  • Speculative (SpMT)
  • Preemptive
  • Cooperative
  • Clustered multi-thread (CMT)
  • Hardware scout
Theory
  • PRAM model
  • PEM model
  • Analysis of parallel algorithms
  • Amdahl's law
  • Gustafson's law
  • Cost efficiency
  • Karp–Flatt metric
  • Slowdown
  • Speedup
Elements
  • Process
  • Thread
  • Fiber
  • Instruction window
  • Array
Coordination
  • Multiprocessing
  • Memory coherence
  • Cache coherence
  • Cache invalidation
  • Barrier
  • Synchronization
  • Application checkpointing
Programming
  • Stream processing
  • Dataflow programming
  • Models
    • Implicit parallelism
    • Explicit parallelism
    • Concurrency
  • Non-blocking algorithm
Hardware
  • Flynn's taxonomy
    • SISD
    • SIMD
      • Array processing (SIMT)
      • Pipelined processing
      • Associative processing
    • MISD
    • MIMD
  • Dataflow architecture
  • Pipelined processor
  • Superscalar processor
  • Vector processor
  • Multiprocessor
    • symmetric
    • asymmetric
  • Memory
    • shared
    • distributed
    • distributed shared
    • UMA
    • NUMA
    • COMA
  • Massively parallel computer
  • Computer cluster
    • Beowulf cluster
  • Grid computer
  • Hardware acceleration
APIs
  • Ateji PX
  • Boost
  • Chapel
  • HPX
  • Charm++
  • Cilk
  • Coarray Fortran
  • CUDA
  • Dryad
  • C++ AMP
  • Global Arrays
  • GPUOpen
  • MPI
  • OpenMP
  • OpenCL
  • OpenHMPP
  • OpenACC
  • Parallel Extensions
  • PVM
  • pthreads
  • RaftLib
  • ROCm
  • UPC
  • TBB
  • ZPL
Problems
  • Automatic parallelization
  • Cache stampede
  • Deadlock
  • Deterministic algorithm
  • Embarrassingly parallel
  • Parallel slowdown
  • Race condition
  • Software lockout
  • Scalability
  • Starvation
  •  Category: Parallel computing
Authority control databases Edit this at Wikidata
  • GND
Retrieved from "https://teknopedia.ac.id/w/index.php?title=Shared_memory&oldid=1312890705"
Categories:
  • Computer architecture
  • Memory management
  • Inter-process communication
  • Concurrent computing
  • Parallel computing
  • Distributed computing architecture
Hidden categories:
  • Articles with short description
  • Short description is different from Wikidata
  • Articles needing additional references from September 2025
  • All articles needing additional references

  • indonesia
  • Polski
  • العربية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصرى
  • Nederlands
  • 日本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українська
  • Tiếng Việt
  • Winaray
  • 中文
  • Русский
Sunting pranala
url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id