Abstract:Traditional multithreaded programs are intrinsic nondeterministic,which makes them tough to write and error-prone.Deterministic parallel programming model is an effective way to ensure parallel programs execute deterministically.We proposed DetMP,a deterministic message passing multithreaded programming model,and implemented it atop our proposed deterministic producer-consumer virtual memory model(SPMC).In this paper,we study the programmability of DetMP and the impact on performance of its implementation mechanisms.We summarize a set of rules on how to rewrite a Pthreads program with DetMP,and use the rewritten DetMP version and the original Pthreads version of seven MapReduce programs as well as one pipelined parallel program(dedup) to compare the performance difference on a 32-core machine.Evaluation results show that the rewritten programs always perform better than the original Pthreads ones.To further analyze whether the performance difference is caused by SPMC or not,the DetMP API is further implemented by using traditional shared-memory Pthreads library.Evaluation results show that all applications except for Matrix Multiply and String Match have better performance on DetMP implemented atop SPMC at 16 and 32 cores,obtaining up to 9.5 times faster;and the performance of the two implementations is comparable for Matrix Multiply,String Match or other applications when the number of cores is lower than 16
曹慧芳,张昱. 确定性多线程编程模型的可编程性及其实现性能的探索[J]. 小型微型计算机系统, 2016, 37(6): 1126-1131.
CAO Hui-fang,ZHANG Yu. Exploring the Programmability and Implementation Performance for a Deterministic Multithreaded Programming Model. Journal of Chinese Computer Systems, 2016, 37(6): 1126-1131.