[PDF][PDF] Detecting data races on weak memory systems

SV Adve, MD Hill, BP Miller, RHB Netzer - ACM SIGARCH Computer …, 1991 - dl.acm.org
ACM SIGARCH Computer Architecture News, 1991dl.acm.org
For shared-memory systems, the most commonly assumed programmer's model of memory
is sequential consistency. The weaker models of weak ordering, release consistency with
sequentially consistent synchronization operations, data-race-free-O, and data-race-free-1
provide higher performance by guaranteeing sequential consistency to only a restricted
class of programs-mainly programs that do not exhibit data races. To allow programmers to
use the intuition and algorithms already developed for sequentially consistent systems, it is …
Abstract
For shared-memory systems, the most commonly assumed programmer’s model of memory is sequential consistency. The weaker models of weak ordering, release consistency with sequentially consistent synchronization operations, data-race-free-O, and data-race-free-1 provide higher performance by guaranteeing sequential consistency to only a restricted class of programs-mainly programs that do not exhibit data races. To allow programmers to use the intuition and algorithms already developed for sequentially consistent systems, it is impontant to determine when a program written for a weak system exhibits no data races. In this paper, we investigate the extension of dynamic data race detection techniques developed for sequentially consistent systems to weak systems. A potential problem is that in the presence of a data race, weak systems fail to guarantee sequential consistency and therefore dynamic techniques may not give meaningful results. However, we reason that in practice a weak system will preserve sequential consistency at least until the “first” data races since it cannot predict if a data race will occur. We formalize this condition and show that it allows data races to be dynamically detected. Further, since this condition is already obeyed by all proposed implementations of weak systems, the full performance of weak systems can be exploited.
ACM Digital Library