Font Size: a A A

An Empirical Study On Lock Usage By Using Automated Static Tool

Posted on:2014-02-07Degree:MasterType:Thesis
Country:ChinaCandidate:S Q HuangFull Text:PDF
GTID:2248330392961056Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Nowadays concurrency programs are becoming more and moreimportant with the development of hardware and network technology.However, it is not easy for programmers to write reliable concurrencyprograms. On the other hand, it is difficult to debug or maintain aconcurrent program because of concurrency’s characteristic such asthread-interleaving. Although there are lots of researches on concurrency,e.g., multi-thread testing, concurrency program verification and data racedetection, all of them are faced with some unsolved issues. For instance,some of them are not scalable enough to large real world applications (e.g.,KLEE fails to analysis the lock pair-up problem of Apache) and some ofthem may incur large amount of false warnings (e.g., the false warning rateof Inspector is about88.7%). As lock is widely used to control sharedmemory access, it is necessary for both programmers and analysis tooldesigners on all directories to have a good knowledge of common lockusage in real world concurrency programs.The main contributions of this paper are as follows:(1) In this paper, an LLVM-based, static, conservative, and lowanalysis overhead lock analysis tool called LUPA is described.(2) Assisted by LUPA, a novel empirical study on lock usage inconcurrency programs is presented assisted by LUPA. In this study, a viewof how lock is used in concurrency programs and how lock usage changeswith the progress of an application’s development is given.Our experiments show that the average analysis overhead of LUPA is413557ms and the overhead for large programs (e.g., MySQL) is less than20minutes. What’s more, LUPA’s recognition accuracy for the special lock patterns is about97.2%.In this paper, four representative concurrency programs (Apache,MySQL, Aget and Pbzip2) are selected. Both lock manifestation and lockusage pattern of different versions are studied. This study reveals someinteresting findings including but not limited to:(a) about80.5%of thelock related functions acquire only one lock;(b) Simple lock pattern isdiffusely used in real world concurrency applications at the highest rate of54.5%;(c) only12out of527detected patterns belong to condition lockpattern which may lead to vulnerabilities easily;(d) only0.65%of thefunctions are lock related.
Keywords/Search Tags:Concurrency program, static analysis, lock pattern, lockanalysis
PDF Full Text Request
Related items