AI helps you reading Science

AI generates interpretation videos

AI extracts and analyses the key points of the paper to generate videos automatically


pub
Go Generating

AI Traceability

AI parses the academic lineage of this thesis


Master Reading Tree
Generate MRT

AI Insight

AI extracts a summary of this paper


Weibo:
It is not enough to write a correct program; the correctness must be demonstrable, ideally by static checking, realistically by a combination of partial static checking followed by disciplined dynamic testing

Eraser: a dynamic data race detector for multi-threaded programs

ACM Trans. Comput. Syst., no. 5 (1998): 27-37

Cited by: 1884|Views205
EI

Abstract

Multi-threaded programming is difficult and error prone. It is easy to make a mistake in synchronization that produces a data race, yet it can be extremely hard to locate this mistake during debugging. This paper describes a new tool, called Eraser, for dynamically detecting data races in lock-based multi-threaded programs. Eraser uses bi...More

Code:

Data:

0
Introduction
  • Multi-threading has become a common programming technique. Most commercial operating systems support threads, and popular applications like Microsoft Word and Netscape Navigator are multi-threaded.

    debugging a multi-threaded program can be difficult.
  • Multi-threading has become a common programming technique.
  • Most commercial operating systems support threads, and popular applications like Microsoft Word and Netscape Navigator are multi-threaded.
  • Debugging a multi-threaded program can be difficult.
  • Simple errors in synchronization can produce timing-dependent data races that can take weeks or months to track down.
  • For this reason, many programmers have resisted using threads.
  • The difficulties with using threads are well summarized by John Ousterhout in his 1996 USENIX presentation “Why Threads are a bad idea”[Ousterhout 96]
Highlights
  • Multi-threading has become a common programming technique
  • The difficulties with using threads are well summarized by John Ousterhout in his 1996 USENIX presentation “Why Threads are a bad idea”[Ousterhout 96]
  • By substituting dynamic checking for static checking, our work aims to allow dynamically allocated shared data while retaining as much of the safety of monitors as possible
  • It is not enough to write a correct program; the correctness must be demonstrable, ideally by static checking, realistically by a combination of partial static checking followed by disciplined dynamic testing
  • Our experience leads us to believe instead that they are a practical and effective way to avoid data races, and that dynamic race detection should be a standard procedure in any disciplined testing effort for a multithreaded program
Conclusion
  • Hardware designers have learned to design for testability. Programmers using threads must learn the same.
  • This paper has described the advantages of enforcing a simple locking discipline instead of checking for races in general parallel programs that employ many different synchronization primitives, and has demonstrated that with this technique it is practical to dynamically check production multi-threaded programs for data races.
  • The authors' experience leads them to believe instead that they are a practical and effective way to avoid data races, and that dynamic race detection should be a standard procedure in any disciplined testing effort for a multithreaded program.
  • The authors believe that the Lockset method implemented in Eraser is promising
Related work
  • An early attempt to avoid data races was the pioneering concept of a monitor introduced by C.A.R. Hoare [Hoare 74]. A monitor is a group of shared variables together with the procedures that are allowed to access them, all bundled together with a single anonymous lock that is automatically acquired and released at the entry and exit of the procedures. The shared variables in the monitor are out of scope (that is, invisible) outside the monitor, consequently they can be accessed only from within the monitor’s procedures, where the lock is held. Thus monitors provide a static, compile-time guarantee that accesses to shared variables are serialized and therefore free from data races. Monitors are an effective way to avoid data races if all shared variables are static globals, but they don’t protect against data races in programs with dynamically allocated shared variables, a limitation that early users found was significant[Lampson & Redell 80]. By substituting dynamic checking for static checking, our work aims to allow dynamically allocated shared data while retaining as much of the safety of monitors as possible.
Reference
  • [Bershad et al. 95] Bershad, B. N., Savage, S., Pardyak, P., Sirer, E. G., Fiuczynski, M., Becker, D., Eggers, S., and Chambers, C. Extensibility, Safety and Performance in the SPIN Operating System. In Proceedings of the Fifteenth ACM Symposium on Operating Systems Principles, pages 267–284, Copper Mountain, CO, December 1995.
    Google ScholarLocate open access versionFindings
  • [Choi & Lewis 97] Choi, S.-E. and Lewis, E. C. University of Washington CSE 552 Project. Personal Communication, March 1997.
    Google ScholarLocate open access versionFindings
  • http://www.cs.washington.edu/homes/
    Findings
  • [Detlefs et al. 97] Detlefs, D. L., Leino, R. M., Nelson, G., and Saxe, J. B. Extended Static Checking. Technical Report 149, Digital Equipment Corporation, Systems Research Center, to appear 1997.
    Google ScholarFindings
  • [Digital Equipment 96a] Digital Equipment. AltaVista Search. http://altavista.digital.com/, 1996.
    Findings
  • [Digital Equipment 96b] Digital Equipment. Vesta Home Page. http://www.research.digital.com/ SRC/vesta/, 1996.
    Findings
  • [Dinning & Schonberg 90] Dinning, A. and Schonberg, E. An Empirical Comparison of Monitoring Algorithms for Access Anomaly Detection. In Proceedings of the Second ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 1–10, Seattle, WA, March 1990.
    Google ScholarLocate open access versionFindings
  • [Dinning & Schonberg 91] Dinning, A. and Schonberg, E. Detected Access Anomalies in Programs with Critical Sectons. Proceedings of the ACM/ONR Workshop on Parallel and Distributed Debugging, published in ACM SIGPLAN Notices, 26(12):85–96, December 1991.
    Google ScholarLocate open access versionFindings
  • [Hoare 74] Hoare, C. Monitors: An Operating System Structuring Concept. Communications of the ACM, 17(10), October 1974.
    Google ScholarLocate open access versionFindings
  • [Kleiman & Eykholt 95] Kleiman, S. and Eykholt, J. Interrupts as Threads. ACM Operating Systems Review, 29(2):21–26, April 1995.
    Google ScholarLocate open access versionFindings
  • [Lamport 78] Lamport, L. Time, clock, and the ordering of events in a distributed system. Communications of the ACM, 21(7), July 1978.
    Google ScholarLocate open access versionFindings
  • [Lampson & Redell 80] Lampson, B. and Redell, D. Experiences with Processes and Monitors in Mesa. Communications of the ACM, 23(2):104–117, February 1980.
    Google ScholarLocate open access versionFindings
  • [Lee & Thekkath 96] Lee, E. K. and Thekkath, C. A. Petal: Distributed virtual disks. In Proceedings of the Seventh International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-VII), 1996.
    Google ScholarLocate open access versionFindings
  • [Manasse & Nelson 91] Manasse, M. S. and Nelson, G. Trestle Reference Manual. Technical Report Research Report 68, Digital Equipment Corporation’s Systems Research Center, Palo Alto, California, December 1991.
    Google ScholarFindings
  • [Mellor-Crummey 91] Mellor-Crummey, J. On-the-fly Detection of Data Races for Programs with Nested Fork-Join Parallelism. In Proceedings of the 1991 Supercomputer Debugging Workshop, pages 1–16, November 1991.
    Google ScholarLocate open access versionFindings
  • [Mellor-Crummey 93] Mellor-Crummey, J. Compile-time Support for Efficient Data Race Detection in Shared-Memory Parallel Programs. In Proceedings of the ACM/ONR Workshop on Parallel and Distributed Debugging, pages 129–139, May 1993.
    Google ScholarLocate open access versionFindings
  • [Nelson et al. 96] Nelson, G., Leino, K. R. M., Saxe, J., and Stata, R. Extended Static Checking Home Page. http://www.research.digital.com/ SRC/esc/Esc.html, 1996.
    Findings
  • [Netzer 91] Netzer, R. H. B. Race Condition Detection for Debugging Shared-Memory Parallel Programs. PhD dissertation, University of Wisconsin-Madison, 1991.
    Google ScholarFindings
  • [Ousterhout 96] Ousterhout, J. K. Why Threads Are A Bad Idea (for most purposes). Invited talk at the 1996 USENIX Conference, January 1996. http://www.smli.com/people/john.ousterhout/threads.ps.
    Findings
  • [Perkovic & Keleher 96] Perkovic, D. and Keleher, P. Online Data-Race Detection via Coherency Guarantees. In Proceedings of the Second USENIX Symposium on Operating Systems Design and Implementation (OSDI), pages 47–58, Seattle, WA, October 1996.
    Google ScholarLocate open access versionFindings
  • [Scales et al. 96] Scales, D. J., Gharachorloo, K., and Thekkath, C. A. Shasta: A Low Overhead, Software-Only Approach for Supporting FineGrain Shared Memory. In Proceedings of the Seventh International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-VII), 1996.
    Google ScholarLocate open access versionFindings
  • [Srivastava & Eustace 94] Srivastava, A. and Eustace, A. ATOM: A System for Building Customized Program Analysis Tools. In Proceedings of the 1994 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 196–205, 1994.
    Google ScholarLocate open access versionFindings
  • [SunSoft 94] SunSoft. lock lint User’s Guide. SunSoft Manual, August 1994.
    Google ScholarFindings
Your rating :
0

 

Tags
Comments
数据免责声明
页面数据均来自互联网公开来源、合作出版商和通过AI技术自动分析结果,我们不对页面数据的有效性、准确性、正确性、可靠性、完整性和及时性做出任何承诺和保证。若有疑问,可以通过电子邮件方式联系我们:report@aminer.cn
小科