• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】分布式共享内存是什么

问答 admin 4周前 (04-10) 24次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

分布式共享内存是并行处理发展中出现的一种重要技术。提供给程序员一个逻辑上统一的地址空间,任何一台处理机都可以对这一地址空间直接进行读写操作。具有分布式内存结构可扩充性的优点,也具有共享内存结构通用性好、可移植性、编程容易的优点。

Distributed shared memory is an important technology in the development of parallel processing. It provides programmers with a logically unified address space, and any processor can directly read and write this address space. It has the advantages of scalability of distributed memory structure, good generality, portability and easy programming of shared memory structure.

分布式共享内存(distributed shared memory)是并行处理发展中出现的一种重要技术。(下文简称 DSM)提供给程序员一个逻辑上统一的地址空间,任何一台处理机都可以对这一地址空间直接进行读写操作。具有分布式内存结构可扩充性的优点,也具有共享内存结构通用性好、可移植性、编程容易的优点。

Distributed shared memory is an important technology in the development of parallel processing. DSM (hereinafter referred to as DSM) provides programmers with a logically unified address space, and any processor can directly read and write the address space. It has the advantages of scalability of distributed memory structure, good generality, portability and easy programming of shared memory structure.

热点技术包含复制问题、存储一致性模型等。实现方法包含硬件、软件、软硬件结合实现三种方式。

Hot technologies include replication problem, storage consistency model and so on. The implementation method includes hardware, software and the combination of software and hardware.

虽然从实现上考虑,这个统一的全局地址空间是不存在的,数据的访问是通过消息传递来进行的,但这些对程序员来说可以是透明的。

Although the unified global address space does not exist and data access is carried out by message passing, it can be transparent to programmers.

实现方式

Implementation mode

DSM 的实现有三种方式:

There are three ways to implement DSM

①用硬件实现。实际上是传统的高速缓存(cache)技术在可扩展体系结构中的延伸。

① It is realized by hardware. In fact, it is the extension of traditional cache technology in scalable architecture.

②操作系统和程序库的实现方法,通过虚拟内存管理机制实现共享和一致性。

② The implementation of operating system and program library realizes sharing and consistency through virtual memory management mechanism.

③编译实现,自动将共享访问转变为同步和一致性原语。

③ Compile implementation, automatically turn shared access into synchronization and consistency primitives.

复制问题

Replication problem

在 DSM 中,共享数据的位置可以是固定不动的、迁移的、复制的三种情况.复制要考虑解决以下几个问题:

In DSM, the location of shared data can be fixed, migrated and replicated

(1) 共享数据的粒度

(1) Granularity of shared data

数据的共享粒度是指系统对数据访问故障复制的数据大小,不仅包括一次读数据要传输多少数据,还包括一次写数据会影响多少数据的有效性。一定的数据共享粒度可以使应用程序中的访问开发其局部性,使多次访问分担传送数据的开销。

The granularity of data sharing refers to the size of the data copied by the system in case of data access failure, which includes not only how much data to transmit when reading data at one time, but also how much data validity will be affected when writing data at one time. A certain granularity of data sharing can make the access development in the application localized and make multiple access share the cost of data transmission.

(2) 一致性协议

(2) Conformance protocol

对于数据复制的情况有两种基本的协议。即写无效和写更新协议.对于写无效与写更新的选择,利用竞争算法可以有自适应的优点。其结果在某些情况达到最忧结果,最坏也不超过全用写更新方式开销的两倍。

There are two basic protocols for data replication. For the choice of write invalidation and write update, the competitive algorithm has the advantage of self adaptation. The result is the worst in some cases, and the worst is no more than twice the cost of all write update.

(3) 颠簸和替换

(3) Bump and replace

颠簸是指当两个结点同时对数据页进行写访问时引起的页面在两个结点之间频繁的传输,这种情况严重影响了系统的性能。

Bump refers to the frequent transmission of data pages between two nodes when two nodes write to each other at the same time, which seriously affects the performance of the system.

存储一致性(coherence)模型

Storage coherence model

有效地提供内存一致性是 DSM 系统的一个重要任务。为了能对存储器的性能进行优化,即利用写缓存技术、存储访问重叠技术、流水线技术等严格的一致性,无法开发程序的语义,因而出现了减弱了的一致性模型。其目的是为了解决三个问题:减少昂贵的消息发送次数;掩盖对非本地内存访问的长等待时间;解决因为一致性单元而潜在引起的假共享问题。

It is an important task for DSM system to provide memory consistency effectively. In order to optimize the performance of memory, such as using write cache technology, memory access overlap technology, pipeline technology and other strict consistency, it is impossible to develop the semantics of program, so the weakened consistency model appears. Its purpose is to solve three problems: reduce the number of expensive messages sent; cover up the long waiting time for non local memory access; solve the potential false sharing problem caused by consistency unit.

已有的一致性模型有:原子一致性、顺序一致性、处理机一致性、弱一致性、释放一致性、进入一致性。

The existing consistency models are: atomic consistency, sequential consistency, processor consistency, weak consistency, release consistency and entry consistency.

实现方法

Implementation method

硬件实现

Hardware implementation

具有单一总线的共享内存多处理机系统具有不易扩展的缺点。为了解决这个问题,DSM 系统如 DASH,WillowH,ASURA 等在体系结构、处理机及内存的组织上有了变化.即由几个处理机形成一个 cluster,cluster 内的处理机由总线相连,而 cluster 之间由互连网络相连,每个 cluster 有自己的共享内存。

Shared memory multiprocessor system with single bus has the disadvantage of not easy to expand. In order to solve this problem, the architecture, processor and memory organization of DSM systems such as dash, willow h and Asura have been changed. That is to say, several processors form a cluster. The processors in the cluster are connected by bus, and the clusters are connected by interconnection network. Each cluster has its own shared memory.

另一种新的 DSM 的体系结构是 COMA(cache only memory architecture),COMA 的所有内存都是以大的 cache 形式组织的.这个内存除了作为处理机的 cache 以外,它也包括有它永远不会访问的共享数据,它既是一个 cache 又是一共享存储的虚拟部分。

Another new DSM architecture is coma (cache only memory architecture). All memory of coma is organized in the form of large cache. This memory not only serves as the cache of processor, but also includes shared data that it will never access. It is both a cache and a virtual part of shared memory.

软件实现

Software implementation

在软件的开发上有三种途径。

There are three ways to develop software.

①在语言层上开发,比如雅典的 OCCAM2++,通过预编译器将对共享变量的访问转化为利用虚拟通道进行的通信原语。

① In the language layer, such as occam2 + + in Athens, access to shared variables is converted into communication primitives using virtual channels by precompiler.

②编译实现,即将对共享变量的访问转化为向页面所有者请求页面的语句。

② Compiler implementation, that is, the access to the shared variable is transformed into the statement to request the page from the page owner.

③在操作系统层实现,一般要通过对操作系统某些调用进行修改实现,比如 IBM Research 的 DSVM6K 就是对原有操作系统 AIX v3 作尽量少的修改完成的.IVY 也属于此类。

③ In the operating system layer, it is generally implemented by modifying some calls of the operating system. For example, dsvm6k of IBM research makes as few modifications as possible to the original operating system AIX v3. Ivy also belongs to this category.

软硬件结合

Combination of software and hardware

在系统实现中,硬件实现具有速度快的优点,但价格比较昂贵.软件速度不如硬件快,但其价格相对比较便宜.因而要设计一个比较合算的系统,要考虑二者的结合.Limit—LESS 系统的目录实现中,硬件实现一定量的目录项,少量的目录可以存储在其中.但当目录项增大时,就要有一部分目录存储在内存中,由软件进行相应的处理.在 Galatica—Net 的实现中,将性能比较关键的部分(写更新)由硬件实现,而其它部分(如结点间页面的共享)则由操作系统软件实现.FLASH 在死锁的避免上,对于所需空间多于可使用的输出队列空间的消息,设置软件队列,在输出队列有空闲空间时再从软件队列中将要发送的消息放在输出队列中.

In the system implementation, the hardware implementation has the advantage of fast speed, but the price is relatively expensive. The software speed is not as fast as the hardware, but the price is relatively cheap. Therefore, to design a more cost-effective system, we should consider the combination of the two In the system’s directory implementation, the hardware implements a certain number of directory entries, and a small number of directories can be stored in them. But when the directory entries increase, a part of the directories must be stored in the memory and processed by the software In the implementation of flash, the key part (write update) is implemented by hardware, while other parts (such as page sharing between nodes) are implemented by operating system software In order to avoid deadlock, the software queue is set for messages that need more space than the available output queue space. When the output queue has free space, the messages to be sent are put into the output queue from the software queue


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】分布式共享内存是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址