Abstract
This paper presents an expressive specification and verification framework for ensuring deadlock freedom of shared-memory concurrent programs that manipulate locks. We introduce a novel delayed lockset checking technique to guarantee deadlock freedom of programs with interactions between thread and lock operations. With disjunctive formulae, we highlight how an abstraction based on precise lockset can be supported in our framework. By combining our technique with locklevels, we form a unified formalism for ensuring deadlock freedom from (1) double lock acquisition, (2) interactions between thread and lock operations, and (3) unordered locking. The proposed framework is general, and can be integrated with existing specification logics such as separation logic. Specifically, we have implemented this framework into a prototype tool, called ParaHIP, to automatically verify deadlock freedom and correctness of concurrent programs against user-supplied specifications.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
NetBSD Problem Report 42900, http://gnats.netbsd.org/42900
Atig, M.F., Bouajjani, A., Emmi, M., Lal, A.: Detecting Fair Non-termination in Multithreaded Programs. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 210–226. Springer, Heidelberg (2012)
Boyapati, C., Lee, R., Rinard, M.C.: Ownership types for safe programming: preventing data races and deadlocks. In: OOPSLA, pp. 211–230 (2002)
Butenhof, D.R.: Programming with POSIX Threads. Addison-Wesley (1997)
Cai, Y., Chan, W.K.: MagicFuzzer: Scalable Deadlock Detection for Large-scale Applications. In: ICSE, pp. 606–616 (2012)
Coffman, E.G., Elphick, M.J., Shoshani, A.: System Deadlocks. ACM Computing Surveys 3(2), 67–78 (1971)
Cook, B., Podelski, A., Rybalchenko, A.: Proving Program Termination. CACM 54(5), 88–98 (2011)
Fu, M., Zhang, Y., Li, Y.: Formal Reasoning about Concurrent Assembly Code with Reentrant Locks. In: TASE, pp. 233–240 (2009)
Gerakios, P., Papaspyrou, N., Sagonas, K.F.: A Type and Effect System for Deadlock Avoidance in Low-level Languages. In: TLDI, pp. 15–28 (2011)
Gordon, C.S., Ernst, M.D., Grossman, D.: Static Lock Capabilities for Deadlock Freedom. In: TLDI, pp. 67–78 (2012)
Gotsman, A., Berdine, J., Cook, B., Rinetzky, N., Sagiv, M.: Local Reasoning for Storable Locks and Threads. In: Shao, Z. (ed.) APLAS 2007. LNCS, vol. 4807, pp. 19–37. Springer, Heidelberg (2007)
Haack, C., Huisman, M., Hurlin, C.: Reasoning about Java’s Reentrant Locks. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 171–187. Springer, Heidelberg (2008)
Hoare, T.: The Verifying Compiler: A Grand Challenge for Computing Research. JACM 50, 63–69 (2003)
Hobor, A., Appel, A.W., Nardelli, F.Z.: Oracle Semantics for Concurrent Separation Logic. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 353–367. Springer, Heidelberg (2008)
Jacobs, B., Piessens, F.: Expressive Modular Fine-grained Concurrency Specification. In: POPL, New York, NY, USA, pp. 271–282 (2011)
Joshi, P., Naik, M., Sen, K., Gay, D.: An Effective Dynamic Analysis for Detecting Generalized Deadlocks. In: FSE, pp. 327–336 (2010)
Kobayashi, N.: Type-based Information Flow Analysis for the Pi-calculus. Acta Informatica 42(4-5), 291–347 (2005)
Kobayashi, N.: A New Type System for Deadlock-Free Processes. In: Baier, C., Hermanns, H. (eds.) CONCUR 2006. LNCS, vol. 4137, pp. 233–247. Springer, Heidelberg (2006)
Kobayashi, N., Sangiorgi, D.: A Hybrid Type System for Lock-Freedom of Mobile Processes. TOPLASÂ 32(5) (2010)
Le, D.-K., Chin, W.-N., Teo, Y.-M.: Variable Permissions for Concurrency Verification. In: Aoki, T., Taguchi, K. (eds.) ICFEM 2012. LNCS, vol. 7635, pp. 5–21. Springer, Heidelberg (2012)
Le, D.K., Chin, W.N., Teo, Y.M.: An Expressive Framework for Verifying Deadlock Freedom. Technical report, National University of Singapore (June 2013), http://loris-7.ddns.comp.nus.edu.sg/~project/parahip/parahip-tr.pdf
Lee, E.A.: The Problem with Threads. Computer 39, 33–42 (2006)
Leino, K.R.M., Müller, P.: A Basis for Verifying Multi-threaded Programs. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 378–393. Springer, Heidelberg (2009)
Leino, K.R.M., Müller, P., Smans, J.: Deadlock-Free Channels and Locks. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 407–426. Springer, Heidelberg (2010)
Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from Mistakes: A Comprehensive Study on Real World Concurrency Bug Characteristics. In: ASPLOS, New York, NY, USA, pp. 329–339 (2008)
Luo, Z.D., Das, R., Qi, Y.: Multicore SDK: A Practical and Efficient Deadlock Detector for Real-World Applications. In: ICST, pp. 309–318 (2011)
Müller, P.: Personal communication (March 2013)
Naik, M., Park, C.-S., Sen, K., Gay, D.: Effective Static Deadlock Detection. In: ICSE, pp. 386–396 (2009)
Nguyen, H.H., David, C., Qin, S.C., Chin, W.-N.: Automated Verification of Shape and Size Properties Via Separation Logic. In: Cook, B., Podelski, A. (eds.) VMCAI 2007. LNCS, vol. 4349, pp. 251–266. Springer, Heidelberg (2007)
Ouaknine, J., Palikareva, H., Roscoe, A.W., Worrell, J.: Static Livelock Analysis in CSP. In: Katoen, J.-P., König, B. (eds.) CONCUR 2011. LNCS, vol. 6901, pp. 389–403. Springer, Heidelberg (2011)
Parkinson, M., Bornat, R., Calcagno, C.: Variables as Resource in Hoare Logics. In: LICS, Washington, DC, USA, pp. 137–146 (2006)
Reynolds, J.: Separation Logic: A Logic for Shared Mutable Data Structures. In: LICS, Copenhagen, Denmark (July 2002)
Smans, J., Jacobs, B., Piessens, F.: Implicit Dynamic Frames. In: TOPLAS (2012)
Suenaga, K.: Type-Based Deadlock-Freedom Verification for Non-Block-Structured Lock Primitives and Mutable References. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 155–170. Springer, Heidelberg (2008)
Williams, A., Thies, W., Awasthi, P.: Static Deadlock Detection for Java Libraries. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 602–629. Springer, Heidelberg (2005)
Wing, J.M.: FAQ on Pi-calculus. In: Microsoft Internal Memo (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer International Publishing Switzerland
About this paper
Cite this paper
Le, DK., Chin, WN., Teo, YM. (2013). An Expressive Framework for Verifying Deadlock Freedom. In: Van Hung, D., Ogawa, M. (eds) Automated Technology for Verification and Analysis. Lecture Notes in Computer Science, vol 8172. Springer, Cham. https://doi.org/10.1007/978-3-319-02444-8_21
Download citation
DOI: https://doi.org/10.1007/978-3-319-02444-8_21
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-02443-1
Online ISBN: 978-3-319-02444-8
eBook Packages: Computer ScienceComputer Science (R0)