kirancodes.me
To Proof Maintenance & Beyond!

What change history tells us about thread synchronization

Rui Gu, Guoliang Jin, Linhai Song, Linjie Zhu, Shan Lu

Abstract

Multi-threaded programs are pervasive, yet difficult to write. Missing proper synchronization leads to correctness bugs and over synchronization leads to performance problems. To improve the correctness and efficiency of multi-threaded software, we need a better understanding of synchronization challenges faced by real-world developers. This paper studies the code repositories of open-source multi-threaded software projects to obtain a broad and in- depth view of how developers handle synchronizations. We first examine how critical sections are changed when software evolves by checking over 250,000 revisions of four representative open-source software projects. The findings help us answer questions like how often synchronization is an afterthought for developers; whether it is difficult for devel- opers to decide critical section boundaries and lock variables; and what are real-world over-synchronization problems. We then conduct case studies to better understand (1) how critical sections are changed to solve performance prob- lems (i.e. over-synchronization issues) and (2) how soft- ware changes lead to synchronization-related correctness problems (i.e. concurrency bugs). This in-depth study shows that tool support is needed to help developers tackle over-synchronization problems; it also shows that concur- rency bug avoidance, detection, and testing can be improved through better awareness of code revision history.

BibTeX
@inproceedings{Gu-al:FSE15,
  author    = {Rui Gu and
               Guoliang Jin and
               Linhai Song and
               Linjie Zhu and
               Shan Lu},
  title     = {What change history tells us about thread synchronization},
  booktitle = {{ESEC/SIGSOFT} {FSE}},
  pages     = {426--438},
  publisher = {{ACM}},
  year      = {2015},
}

Related papers