DOI QR코드

DOI QR Code

내부적 비결정성을 가진 공유 메모리 병렬 프로그램에서 잠재적 경합탐지를 위한 전처리기

A Preprocessor for Detecting Potential Races in Shared Memory Parallel Programs with Internal Nondeterminism

  • 김영주 (한국과학기술원) ;
  • 정민섭 ((주)글로벌스텐다드테크놀로지 SE사업본부) ;
  • 전용기 (경상대학교 정보과학과)
  • 발행 : 2010.02.28

초록

OpenMP와 같은 공유 메모리 기반의 병렬 프로그램에서 발생하는 경합은 프로그래머가 의도하지 않은 비결정적인 수행 결과를 초래하므로 반드시 탐지되어야한다. 이러한 경합의 존재를 수행 중에 검증하는 기존의 기법들은 내부적 비결정성이 존재하지 않는 프로그램에 대해서만 가능하다. 하지만 이 조건을 만족하지 못한다면 경합검증을 위해서 각 임계구역마다 적어도 N! 만큼의 프로그램 수행이 필요하다. 여기서 N은 탐지 대상 프로그램이 가진 최대 병렬성을 의미한다. 본 논문에서는 프로그램 슬라이싱을 이용하여 내부적 비결정성을 가진 프로그램에 존재하는 비결정적 접근사건을 정적으로 분석하고, 이 정보를 이용하여 한번의 수행으로 실제 경합뿐만 아니라 잠재적 경합까지 탐지할 수 있는 경합 전처리기를 제안한다. 제안된 도구는 OpenMP 병렬 프로그램에서 발생할 수 있는 비결정적 접근사건들에 대해서 항상 결정적으로 감시할 수 있으므로 임계구역 가진 프로그램 모델에 적용할 수 있는 어떠한 경합탐지 프로토콜을 사용하더라도 경합 검증이 가능하다. 본 도구의 실험적 증명을 위해서 비결정성이 포함된 합성 프로그램, 공인된 벤치마크 프로그램인 OpenMP Microbenchmark, NAS Parallel Benchmark, 그리고 OpenMP 응용 프로그램을 이용하여 제안된 도구의 정확성을 보인다.

Races that occur in shared-memory parallel programs such as OpenMP programs must be detected for debugging because of causing unintended non-deterministic results. Previous works which verify the existence of these races on-the-fly are limited to the programs without internal non-determinism. But in the programs with internal non-determinism, such works need at least N! execution instances for each critical section to verify the existence of races, where N is the degree of maximum parallelism. This paper presents a preprocessor that statically analyzes the locations of non-deterministic accesses using program slicing and can detect apparent races as well as potential races through single execution using the analyzed information. The suggested tool can deterministically monitor non-deterministic accesses to occur in OpenMP programs so that this tool can verify the existence of races even if it is used any race detection protocol which can apply to programs with critical section. To prove empirically this tool, we have experimented using a set of benchmark programs such as synthetic programs that involve non-deterministic accesses, OpenMP Microbenchmark, NAS Parallel Benchmark, and OpenMP application programs.

키워드

참고문헌

  1. Netzer, R. H. B., B. P. Miller, "What Are Race Conditions? Some Issues and Formalizations," ACM Letters on Programming Language and Systems, pp.74-88, ACM, March, 1992.
  2. Dinning, A., E. Schonberg, "Detecting Access Anomalies in Programs with Critical Sections," 2nd Workshop on Parallel and Distributed Debugging, pp.85-96, ACM, May, 1991.
  3. O'Callahan, R. and J. Choi, "Hybrid Dynamic Data Race Detection," Proc. of ACM SIGPALN Symp. on Principle and Practice of Parallel Programming (PPoPP), San Diego, California, ACM, June, 2003.
  4. Petersen, P., and S. Shah, "OpenMP Support in the Intel Thread Checker," Int'l Workshop on OpenMP Applications and Tools, 1-12, June, 2003.
  5. Praun, C., T. R. Gross, "Object Race Detection," Proc. of the 16th ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, pp. 70-82, ACM, October, 2001.
  6. Stefan S., M. Burrows, G. Nelson, P. Sobalvarro, T. Anderson, "Eraser: a dynamic data race detector for multithreaded programs," ACM Transactions on Computer Systems (TOCS), pp.391-411, ACM, Nov., 1997.
  7. Yu, Y., T. Rodeheffer, W. Chen, "Race Track: Efficient Detection of Data Race Conditions via Adaptive Tracking," Proc. of the twentieth ACM Symposium on Operating Systems Principles, pp.221-234, ACM, Oct., 2005.
  8. Cheng, G. I., M. Feng, C. E. Leiserson, K. H. Randall, A. F. Stark "Detecting Data Races in Cilk Programs that Use Locks," Proc. of the Tenth Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA), pp.298-309, ACM, June, 1998.
  9. Kim, Y., D. Kim, and Y. Jun, "An Empirical Analysis of Intel Thread Checker for Detecting Races in OpenMP Programs," Int'l Conf. on Computer and Information Science (ICIS), pp.409-414, IEEE, Portland, USA, May, 2008.
  10. SUN Microsystems Inc., Sun Studio12: Thread Analyzer User's Guide, 2007.
  11. Terboven, C., "Comparing Intel Thread Checker and Sun Thread Analyzer," Mini-symposium on Scalability and Usability of HPC Programming Tools, In Parallel Computing (PARCO), September, 2007.
  12. Dagum, L., and R. Menon, "OpenMP: An Industry-Standard API for Shared-Memory Programming," IEEE Computational Science & Engineering, pp.5(1): 46-55, IEEE, January/ March, 1998. https://doi.org/10.1109/99.660313
  13. Dinning, A., E. Schonberg, "An Empirical Comparison of Monitoring Algorithms for Access Anomaly Detection," 2nd Symp. On Principles and Practice of Parallel Programming, pp.1-10, ACM, March, 1990.
  14. Audenaert, K., "Clock Trees: Logical Clocks for Programs with Nested Parallelism," Tr. on Software Engineering, 23(10): 646-658, IEEE, Oct., 1997. https://doi.org/10.1109/32.637147
  15. Jun, Y., and K. Koh, " On-the-fly Detection of Access Anomalies in Nested Parallel Loops," Proc. of the 3rd ACM/ONR Workshop on Parallel and Distributed Debugging, pp. 107-117, ACM, San Diego, California, May 1993. Also in SIGPLAN Notices, 28(12): 107-117, ACM, Nov., 193.
  16. Park, S., M. Park, and Y. Jun, "A Comparison of Scalable Labeling Schemes for Detecting Races in OpenMP Programs," Proc. of the Int'l Workshop on OpenMP Applications and Tools, Purdue Univ., West Lafayette, Indiana, Lecture Notes in Computer Science, 2104: 68-80, Springer-Verlag, July, 2001.
  17. Ferrante, J., T. J. Watson, J. Ottenstein, J. D. Warren, "The Program Dependence Graph and Its Use in Optimization," ACM Transactions on Programming Languages and Systems (TOPLAS), pp.319-349, ACM, July, 1987.
  18. Kim, Y., M. Kang, O. Ha, and Y. Jun, "Effcient Race Verfication for Debugging Programs with OpenMP Directives," Int'l Conf. on Parallel Computing Technologies (PaCT), Pereslavl-Zalessky, Russia, Sept. 2007, Lecture Notes in Computer Science, 4671: 230-239, Springer, Aug., 2007.
  19. 김영주, 전용기, "OpenMP 디렉티브 프로그램을 위한 자료경합 검증도구," 정보과학회논문지: 시스템 및 이론, 34(9):395-406, 한국정보과학회, 2007.9.
  20. Bull, J. M., "Measuring Synchronisation and Scheduling Overheads in OpenMP," Proc. of European Workshop on OpenMP (EWOMP), pp.99-105, Sept. 1999.
  21. Jin, H., M. Frumkin, and J. Yan, "The OpenMP Implementation of NAS Parallel Benchmarks and its Performance," NAS TR: NAS-99-011, NASA Ames Research Center, 1999.