为了解决多核机群并行程序中共享数据所使用的锁机制存在的不足,提出多核机群软件事务内存(STM,Software Transactional Memory)并行编程模型.首先分析MPI+OpenMP并行编程模型的优缺点,然后根据软件事务内存的优势,对多核节点内的多线程共享存储采用乐观检测冲突及优先数优先的竞争管理策略设计事务内存替代锁机制,在多核机群平台中构建新的MPI+OpenMP+STM三级并行编程模型,并将模型应用于随机摄动人工蜂群并行算法的设计与实现,运用MPI+TBB平台对人工蜂群并行算法进行对比实验.实验结果表明,该模型是解决多核机群数据共享锁机制问题的一种有效的编程模式.
In order to solve the existing problems of the locking mechanism used in the shared data of multi-core cluster parallel pro- gram, the paper puts forward multi-core cluster software transactional memory parallel programming model. First the advantages and disadvantages of "MPI + OpenMP" parallel programming model are analyzed. Then according to the advantage of software transac- tional memory, the multithreaded shared memory is under optimistic collision detection and priority number priority competition man- agement strategy is used to design the transactional memory instead of locking mechanism in multi cores. The new "MPI + OpenMP + STM" parallel programming model is constructed in multi-core cluster platform. This model is applied to the design and imple- mentation of the random perturbation artificial bee colony parallel algorithm, which is contrasted in "MPI + TBB" platform. The ex- perimental results show that the model is an effective programming mode in solving multi-core cluster data sharing.