Abstract
It is important to analyze and identify potential deadlocks resident in multithreaded programs from a successful deadlock-free execution, because the nondeterministic nature of such programs may hide the errors during testing. Visualizing the runtime behaviors of locking operations makes it possible to debug such errors effectively, because it provides intuitive understanding of different feasible executions caused by nondeterminism. However, with previous visualization techniques, it is hard to capture alternate orders imposed by locks due to their representation of a partial-order over locking operations. This paper presents a novel graph, called lock-causality graph, which represents alternate orders over locking operations. A visualization tool implements the graph, and demonstrates its power using the classical dining-philosophers problem written in Java. The experiment result shows that the graph provides a simple but powerful representation of potential deadlocks in an execution instance not deadlocked.
This research was supported by the MKE (The Ministry of Knowledge Economy), Korea,under the ITRC (Information Technology Research Center) support program supervised by the IITA (Institute for Information Technology Advancement) (IITA-2009-C1090-0904-0001).
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Agarwal, A., Garg, V.K.: Run-Time Detection of Potential Deadlocks for Programs with Locks, Semaphores, and Condition Variables. In: 2006 Workshop on Parallel and Distributed Systems: Testing and Debugging (PADTAD), Portland, Maine, pp. 51–60. ACM, New York (2006)
Agarwal, A., Wang, L., Stoller, S.D.: Detecting Potential Deadlocks with Static Analysis and Run-Time Monitoring. In: Ur, S., Bin, E., Wolfsthal, Y. (eds.) HVC 2005. LNCS, vol. 3875, pp. 191–207. Springer, Heidelberg (2006)
Artho, C., Havelund, K., Honiden, S.: Visualization of Concurrent Program Executions. In: 31st Annual International Computer Software and Applications Conference (COMPSAC), vol. 2, pp. 541–546. IEEE, Los Alamitos (2007)
Bensalem, S., Havelund, K.: Dynamic Deadlock Anaysis of Multi-threaded Programs. In: Ur, S., Bin, E., Wolfsthal, Y. (eds.) HVC 2005. LNCS, vol. 3875, pp. 208–223. Springer, Heidelberg (2006)
Birrell, D.A.: An Introduction to Programming with Threads. Technical Report SR-35, Digital Equipment Corporation (January 1989)
Carr, S., Mayo, J., Shene, C.-K.: ThreadMentor: A Pedagogical Tool for Multithreaded Programming. Journal on Education Resources in Computing (JERIC) 3(1), 1–30 (2003)
Diehl, S.: Software Visualization: Visualizing the Structure, Behavior, and Evolve of Software. Springer, Heidelberg (2007)
Fidge, C.J.: Partial Orders for Parallel Debugging. In: SIGPLAN/SIGOPS Workshop on Parallel and Distributed Debugging, pp. 183–194. ACM Press, New York (1988)
Gatlin, S.K.: Trials and Tribulations of Debugging Concurrency. Queue 2(7), 66–73 (2004)
Kraemer, E.: Visualizing Concurrent Programs. In: Software Visualization: Programming as a Multimedia Experience, pp. 237–258. The MIT Press, Cambridge (1998)
Lamport, L.: Time, Clocks, and the Ordering of Events in a Distributed System. Communication of the ACM 21(7), 558–565 (1978)
Leroux, H., Requile-Romanczuk, A., Mingins, C.: JACOT: A Tool to Dynamically Visualise the Execution of Concurrent Java Programs. In: 2nd Int. Conf. on Principles and Practice of Programming in Java (PPPJ), Kilkenny City, Ireland, pp. 201–206. ACM, New York (2003)
McDowell, C.E., Helmbold, D.P.: Debugging Concurrent Programs. Computing Surveys 21(4), 593–622 (1989)
Mehner, K.: JaVis: A UML-Based Visualization and Debugging Environment for Concurrent Java Programs. In: Diehl, S. (ed.) Dagstuhl Seminar 2001. LNCS, vol. 2269, pp. 163–175. Springer, Heidelberg (2002)
Sanden, B.: Coping with Java Threads. Computer 37(4), 20–27 (2004)
Zhao, Q.A., Stasko, J.T.: Visualizing the Execution of Threads-based Parallel Programs. Technical Report GIT-GVU-95-01, College of Computing, George Institute of Technology (January 1995)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kim, BC., Jun, SW., Hwang, D.J., Jun, YK. (2009). Visualizing Potential Deadlocks in Multithreaded Programs. In: Malyshkin, V. (eds) Parallel Computing Technologies. PaCT 2009. Lecture Notes in Computer Science, vol 5698. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-03275-2_32
Download citation
DOI: https://doi.org/10.1007/978-3-642-03275-2_32
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-03274-5
Online ISBN: 978-3-642-03275-2
eBook Packages: Computer ScienceComputer Science (R0)