计算机科学中,分区全局地址空间(partitioned global address space:PGAS)是一种并行编程模型。在PGAS模型中,多个SPMD线程或进程分享出它们地址空间的一部份,从而共享出一个划分了分区的全局地址空间,对于每个线程或进程在其中都有对它是局部性的那一部份[1]

简介

编辑

PGAS模型试图将针对分布式内存英语Distributed memory系统的如MPI那样的SPMD英语SPMD编程样式,和共享内存系统的数据参照语义二者的好处结合起来。PGAS模型相较分布式共享内存有所创新,共享内存空间的一部份可以对特定线程或进程有“亲和性”,从而利用上参照局部性。这也比传统共享内存方式的一个平直地址空间要更具现实性,因为特定于硬件的数据局部性比如NUMA,可以在划分地址空间中进行建模。

PGAS模型是SHMEM英语SHMEM[2]Unified Parallel CCoarray Fortran英语Coarray FortranChapel英语ChapelX10英语X10 (programming language)Fortress英语Fortress (programming language)Split-C英语Split-CGlobal Arrays英语Global Arrays、UPC++[3]、Coarray C++[4]、DASH[5]的基础。自从Fortran 2008,这个模型被集成为标准Fortran语言的一部份。

PGAS模型的一个变体是异步分区全局地址空间(asynchronous partitioned global address space:APGAS),它允许建立局部和远程异步任务二者[6]。使用了这个模型的两个编程语言是Chapel英语ChapelX10英语X10 (programming language)

其他例子

编辑

参见

编辑

引用

编辑
  1. ^ Cristian Coarfă; Yuri Dotsenko; John Mellor-Crummey, "An Evaluation of Global Address Space Languages: Co-Array Fortran and Unified Parallel C"页面存档备份,存于互联网档案馆
  2. ^ OpenSHMEM. [2019-12-12]. (原始内容存档于2019-12-09). The Programming Models and Languages team is focused on developing the OpenSHMEM programming model for extreme scale systems. ……Currently, the team partners with NVIDIA, University of Tennessee, Knoxville, Florida State University and Paratools. …… UCX provides communication interfaces, and protocols for efficiently implementing parallel programming models such as MPI, OpenSHMEM, and task-based models. 
  3. ^ UPC++页面存档备份,存于互联网档案馆
  4. ^ Coarray C++页面存档备份,存于互联网档案馆
  5. ^ DASH页面存档备份,存于互联网档案馆
  6. ^ Tim Stitt, "An Introduction to the Partitioned Global Address Space (PGAS) Programming Model"页面存档备份,存于互联网档案馆
  7. ^ Epiphany Architecture Reference (PDF). [2019-12-11]. (原始内容存档 (PDF)于2017-09-22). The Epiphany architecture defines a multicore, scalable, shared-memory, parallel computing fabric. It consists of a 2D array of compute nodes connected by a low-latency mesh network-on-chip英语Network on a chip. ……Local memory in each mesh node that provides 32 Bytes/cycle of sustained bandwidth and is part of a distributed, shared memory system. 

外部链接

编辑

📚 Artikel Terkait di Wikipedia

读写锁

  Alessandrini, Victor. Shared Memory Application Programming: Concepts and Strategies in Multicore Application Programming. Morgan Kaufmann. 2015. 

伪共享

Bolosky, William J.; Scott, Michael L. False sharing and its effect on shared memory performance. Sedms'93: USENIX Systems on USENIX Experiences with Distributed

整体同步并行

for shared-memory parallel programming by A. N. Yzelman, R. H. Bisseling, D. Roose, and K. Meerbergen in International Journal of Parallel Programming, in

GNU侦错器

(gdb) run Starting program: /home/sam/programming/crash Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at

并行编程模型

re-implemented this model for the Encore Multimax, a shared-memory multiprocessor. ……[45].” Blelloch, Guy. Programming Parallel Algorithms (PDF). Communications

智能指针

基于Boost库, C++11加入了shared_ptr和weak_ptr.它们最早在TR1中就被引入,但在C++11中,在Boost的基础上又加入了新的功能。 std::shared_ptr使用引用计数。每一个shared_ptr的拷贝都指向相同的内存。在最后一个shared_ptr析构的时候,内存才会被释放。

内存排序

Gharachorloo, Shared Memory Consistency Models: A Tutorial (页面存档备份,存于互联网档案馆) Intel 64 Architecture Memory Ordering White Paper (页面存档备份,存于互联网档案馆) Memory ordering

CUDA

統一虛擬記憶體(Unified Memory, 從 CUDA 6.0 開始)—— 將所有 CPU 和 GPU 的內存置於統一管理的虛擬記憶體空間下。 共用記憶體(Global Memory)—— 存取快速的區域,使之在多個執行緒間共用,有效頻寬比紋理記憶體(Texture Memory)更大。 與GPU之間更快的下載與回讀