DOI QR코드

DOI QR Code

병행 Java 프로그램의 확장적 경합탐지를 위한 JDI 기반의 투명한 감시도구

A Transparent Monitor Based on JDI for Scalable Race Detection of Concurrent Java Programs

  • 발행 : 2009.04.30

초록

병행 Java 프로그램의 경합은 프로그램의 비결정성을 초래하므로 반드시 탐지되어야 한다. 이러한 경합을 수행 중에 탐지하기 위해서는 스레드에 대한 수행양상과 모든 접근사건들을 감시할 수 있어야 한다. 기존의 경합탐지 기법들은 프로그램의 수행중에 기록된 파일들을 분석하거나 대상 프로그램을 수정하여 감시하므로 스레드나 모든 접근사건들에 대한 감시가 현실적으로 어렵다. 본 연구에서는 JDI(Java Debug Interface)를 이용하여 스레드에 대한 수행양상과 모든 접근사건을 감시하여 확장적 경합탐지를 할 수 있는 투명한 감시도구를 제안한다. 여기서 JDI는 JDPA(Java Platform Debugger Architecture)에서 제공하는 상위 레벨의 100% 순수 자바 인터페이스로써 자바프로그램의 수행중에 특정 정보를 제공할 수 있다. 그리고 제안된 도구의 투명성을 입증하기 위해서 벤치마크 프로그램으로 실험한 결과, 모든 스레드와 접근사건들을 프로그램 수정없이 감시할 수 있었고 프로그램의 감시시간이 20배 이상 증가되었다.

Race conditions in current Java programs must be detected because it may cause unexpected result by non-deterministic executions. For detecting such races during program execution, execution flows of all threads and all access events can be monitored. It is difficult for previous race detection techniques to monitor all threads and access events in actuality because these techniques analyze the files traced during program execution or modify original source programs and then monitor these programs. This paper presents a transparent scalable monitoring tool to detect races using JDI(Java Debug Interface) where JDI is 100% pure java interface to provide in JDPA(Java Platform Debugger Architecture) and is able to provide information corresponding to events occurred in run-time of programs. This tool thus can monitor execution flows of all threads and all access events without program modification. We prove transparency of the presented tool and grasp the efficiency of it using a set of published benchmark programs. As a result of this, the suggested tool can monitor all threads and accesses of these programs without their modification, and their monitoring time is increased to more than 20 times.

키워드

참고문헌

  1. Choi, J., K. Lee, A. Loginov, R. O'Callahan, V. Sarkar and M. Sridharan, 'Efficient And Precise Datarace Detection For Multithreaded Object-oriented Programs,' Conf. on Programming Language Design and Implementation (PLDI), pp.258-269, ACM Press, 2002 https://doi.org/10.1145/543552.512560
  2. Dinning, A., and E. Schonberg, 'Detecting Access Anomalies in Programs with Critical Sections,' 2nd Workshop on Parallel and Distributed Debugging (WPDD), pp.85-96, ACM, May, 1991 https://doi.org/10.1145/127695.122767
  3. EPCC, 'The Java Grande Forum Multi-threaded Benchmarks,' 2007
  4. D. Holmes, Java: Concurrency, Synchronisation and Inheritance, 1998
  5. Jun, Y., and C. E. McDowell, 'Scalable Monitoring Technique for Detecting Races in Parallel Programs,' Proc. of the 5th IEEE Int'l Workshop on High-Level Parallel Programming Models and Supportive Environments (HIPS), IEEE, Lecture Notes in Computer Science, 1800: 340-347, Springer-Verlag, Cancun, Mexico, May, 2000 https://doi.org/10.1007/3-540-45591-4_44
  6. Mellor-Crummey, J., 'On-the-fly Detection of Data Races for Programs with Nested Fork-Join Parallelism,' Proc. of ACM/IEEE Conf. on Supercomputing, pp.24-33, ACM, 1991 https://doi.org/10.1145/125826.125861
  7. Netzer, R. H. B., and B. P. Miller, 'What Are Race Conditions? Some Issues and Formalizations,' Letters on Prog. Lang. and Systems, 1(1): 74-88, ACM, March, 1992 https://doi.org/10.1145/130616.130623
  8. O'Callahan, R. and J. Choi, 'Hybrid Dynamic Data Race Detection,' Proc. of ACM SIGPLAN Symp. on Principle and Practice of Parallel Programming (PPoPP), San Diego, California, ACM, June, 2003 https://doi.org/10.1145/966049.781528
  9. Petersen, P., and S. Shah, 'OpenMP Support in the Intel Thread Checker,' Int'l Workshop on OpenMP Applications and Tools (WOMPAT), pp.1-12, June, 2003
  10. Michiel, R. and K. Bosschere, 'RecPlay: A Fully Integrated Practical Record/Replay System,' ACM Transactions on Computer Systems, pp.133-152, ACM, May, 1999 https://doi.org/10.1145/312203.312214
  11. B. Sandn, 'Coping with Java Threads,' Computer, pp.20-27, IEEE, April, 2004 https://doi.org/10.1109/MC.2004.1297297
  12. Stefan, S., Michael, B., Greg, N., and P. Sobalvarro, 'Eraser: A Dynamic Data Race Detector for Multithreaded Programs,' ACM Transactions on Computer Systems, pp.391-411, ACM, November, 1997 https://doi.org/10.1145/265924.265927
  13. Sun Microsystems, 'Java Platform Debugger Architecture,' 2005
  14. Sun Microsystems, 'Java Debug Interface,' 2006
  15. Sun Microsystems Inc., Sun Studio 12: Thread Analyzer User's Guide, 2007
  16. 김영주, 이승렬, 전용기, '임계구역을 가진 공유메모리 병렬프로그램에서 효율적인 경합 탐지를 위한 사건 선택기법,' 한국정보과학회 춘계학술발표논문집, 27(1): 630-632, 한국정보과학회, 2000. 4
  17. 김영주, 박소희, 박미영, 이승렬, 전용기, '록킹을 가진 OpenMP 병렬프로그램의 경합탐지를 위한 확장적 감시기법 및 도구,' 경상대학교 전산연구, 15: 7-16, 경상대학교, 2000. 12