An Automation-Assisted Empirical Study on Lock Usage for Concurrent Programs

Software Maintenance(2013)

引用 17|浏览1
暂无评分
摘要
Nowadays concurrent programs are becoming more and more important with the development of hardware and network technologies. However, it is not easy for programmers to write reliable concurrent programs. Concurrency characteristics such as thread-interleaving make it difficult to debug or maintain concurrent programs. Although there are lots of research work on concurrency such as multi-thread testing tools, concurrent program verification and data race detection, all of them leave open problems. For instance, some are not scalable enough for large real world applications and some may report false warnings. Since locks are widely used to protect shared memory, it is beneficial for both programmers and tool designers in all fields to have a good understanding of common lock usage patterns in real world concurrent programs. This paper reports an empirical study on lock usage in concurrent programs. It is based on our automatic lock analysis tool called LUPA. The study analyzes how lock is used in concurrent programs and how lock usage changes throughout the product environment. In this study, four representative concurrent programs (Apache httpd, Mysql, Aget, Pbzip2) are selected, of which both lock manifestation and lock usage pattern in different versions are studied. This study reveals some interesting findings including but not limited to: (1) about 80.5% of the lock related functions acquire only one lock, (2) simple lock patterns account for 54.5% of all lock usage in real world applications, (3) only 12 out of 527 detected patterns belong to condition lock pattern which may lead to vulnerabilities easily, (4) only 0.65% of the functions are lock related. Additionally, a potential bug caused by problematic locking pattern is found.
更多
查看译文
关键词
thread-interleaving,reliable concurrent program,multithread testing tools,program testing,automation-assisted empirical study,pbzip2,concurrent programs,lock usage,automatic lock analysis tool,lock usage change,multi-threading,apache httpd,simple lock pattern,concurrent program verification,condition lock pattern,shared memory systems,automatic lock analysis,shared memory protection,data race detection,mysql,empirical study,program verification,concurrent program,aget,lock manifestation,common lock usage pattern,security of data,lupa,multi threading
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要