An extensive empirical study on C++ concurrency constructs
Autor: | Baowen Xu, Yuming Zhou, Di Wu, Lin Chen |
---|---|
Rok vydání: | 2016 |
Předmět: |
Non-lock concurrency control
Computer science business.industry Programming language Concurrency 05 social sciences Multiversion concurrency control 050301 education 020207 software engineering 02 engineering and technology Thread (computing) computer.software_genre Computer Science Applications Concurrent object-oriented programming Software Empirical research 0202 electrical engineering electronic engineering information engineering Concurrent computing business 0503 education computer Information Systems |
Zdroj: | Information and Software Technology. 76:1-18 |
ISSN: | 0950-5849 |
Popis: | ContextNowadays concurrent programming is in large demand. The inherent support for concurrency is therefore increasingly important in programming languages. As for C++, an abundance of standard concurrency constructs have been supported since C++11. However, to date there is little work investigating how these constructs are actually used in developing real software. ObjectiveIn this paper, we perform an extensive empirical study to investigate the actual adoption of C++ concurrency constructs in open-source applications, with the goal to provide useful information for language designers and practitioners to improve the design and use of concurrency constructs. MethodWe first conduct a survey to understand the developers' perception of concurrency constructs. Then, we analyze 492 open-source concurrent applications, comprising 131 million lines of C++ code, to collect the data of the practical adoption of concurrency constructs. Finally, we perform statistical analysis on the collected data and get the quantitative analysis results. ResultsUsing the experimental data, we uncover many interesting findings with respect to the usage of concurrency constructs, the management of synchronization, the relationship between standard concurrency constructs and third-party concurrency constructs, and the difference of applications in using concurrency constructs. For example, we find that: (1) thread-based constructs are significantly more often used to write concurrent programs than atomics-based constructs and task-based constructs; (2) lock-based constructs are significantly more often used to manage synchronization than lock-free constructs and blocking constructs; (3) developers in most projects do not move from third-party concurrency constructs to standard concurrency constructs; and (4) small-size applications introduce concurrency constructs more intensively and more quickly than medium-size applications and large-size applications. ConclusionsThis is the first extensive empirical study on C++ concurrency constructs. The results of this paper should be helpful for designing, teaching, and using C++ concurrency constructs. |
Databáze: | OpenAIRE |
Externí odkaz: |