Detecting data races in Cilk programs that use locks

作者: Guang-Ien Cheng , Mingdong Feng , Charles E. Leiserson , Keith H. Randall , Andrew F. Stark

DOI: 10.1145/277651.277696

关键词:

摘要: When two parallel threads holding no locks in common access the same memory location and at least one of modifies location, a “data race” occurs, which is usually bug. This paper describes algorithms strategies used by debugging tool, called Nondeterminator-2, checks for data races programs coded Cilk multithreaded language. Like its predecessor, Nondeterminator, simple “determinacy” races, Nondeterminator-2 not verifier, since it only computation generated serial execution program on given input. We give an algorithm, ALL-SETS, that determines whether input contains race. For runs serially time T , accesses V shared locations, uses total n locks, holds most k simultaneously, ALL-SETS O(nkT α(V;V )) O(nkV ) space, where α Tarjan’s functional inverse Ackermann’s function. Since may be too inefficient worst case, we propose much more efficient algorithm can to detect obey “umbrella” locking discipline, programming methodology flexible than similar disciplines proposed literature. present BRELLY, detects violations umbrella discipline O(kT using O(kV space. also prove any “abelian” program, whose critical sections commute, produces determinate final state if deadlock free generates datarace free. Thus, Nondeterminator-2’s verify determinacy deadlock-free abelian running Keywords

参考文章(29)
Barton P. Miller, Robert H. B. Netzer, On the Complexity of Event Ordering for Shared-Memory Parallel Program Executions international conference on parallel processing. pp. 93- 97 ,(1990)
David P. Helmbold, Charles E. McDowell, Jian Wang, ANALYZING TRACES WITH ANONYMOUS SYNCHRONIZATION international conference on parallel processing. pp. 70- 77 ,(1989)
Robert H. B. Netzer, Sanjoy Ghosh, Efficient Race Condition Detection for Shared-Memory Programs with Post/Wait Synchronization. international conference on parallel processing. pp. 242- 246 ,(1992)
Robert D Blumofe, None, Executing multithreaded programs efficiently Massachusetts Institute of Technology. ,(1995)
Richard C. Holt, Some Deadlock Properties of Computer Systems ACM Computing Surveys. ,vol. 4, pp. 179- 196 ,(1972) , 10.1145/356603.356607
Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, Thomas Anderson, Eraser: a dynamic data race detector for multithreaded programs ACM Transactions on Computer Systems. ,vol. 15, pp. 391- 411 ,(1997) , 10.1145/265924.265927
Martin C. Rinard, Pedro C. Diniz, Commutativity analysis Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation - PLDI '96. ,vol. 31, pp. 54- 67 ,(1996) , 10.1145/231379.231390
Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, Thomas Anderson, Eraser: a dynamic data race detector for multi-threaded programs symposium on operating systems principles. ,vol. 31, pp. 27- 37 ,(1997) , 10.1145/268998.266641