Argonne National Laboratory

Locking Aspects in Multithreaded MPI Implementations

TitleLocking Aspects in Multithreaded MPI Implementations
Publication TypeReport
Year of Publication2016
AuthorsAmer, A, Lu, H, Wei, Y, Hammond, J, Matsuoka, S, Balaji, P
AbstractMPI implementations rely mostly on locking to provide thread safety and comply with the MPI standard requirements. Yet despite the large body of literature that targets improving lock scalability and fine- grained synchronization, little is known about the arbitration aspect of locking and its effect on MPI implementations. In this paper, we provide an in-depth investigation of the correlation between locking and progress in an MPI runtime. We found that communication progress can be severely hindered when unbounded lock monopolization takes place without yielding work. This situation is common in practice when threads polling for communication progress monopolize an unfair lock, such as a Pthread mutex. We show that FIFO locks can mitigate this issue by circulating the lock among contending threads. In addition, we demonstrate that an adaptive lock that reduces the inference stemming from waiting threads can yield better progress by promoting threads with a higher work potential. Through an extensive comparative evolution of the different locks using benchmarks and applications, we show substantial improvements over the commonly used Pthread mutex approach.  
PDFhttp://www.mcs.anl.gov/papers/P6005-0516.pdf