A software implementation of speculative memory

Kohei Fujisawa, Atsushi Nunome, Kiyoshi Shibayama, Hiroaki Hirata · 2017

Many techniques for parallelizing a sequentially coded program have been developed and put to practical use, but there are many cases in which program codes cannot be parallelized because it is impossible to assure that their parallel execution does not violate the data dependencies in the program. To parallelize such programs, we have previously proposed speculative memory (SM). With SM, programmers can specify the parallel and speculative execution of threads explicitly in their programs. The SM system manages the memory data that are speculatively read or written by the threads running in parallel. When the system detects inconsistent memory accesses, it recovers the computational state of the program and restarts the execution. If such inconsistencies are not encountered often, we can expect the total execution time of the program to be shorter. In this paper we present a software implementation of SM (SSM). We have developed an SM library by using POSIX threads. In spite of large overheads that are essentially unavoidable in a software implementation, our SSM system can shorten the execution time of a program that compilers cannot parallelize automatically.

Read the paper · More papers on PaperTik