One of the major disadvantages of parallel programming with shared memory is the nondeterministic behavior caused by uncoordinated access to shared variables, known as <italic>access anomalies</italic>. Monitoring program execution to detect access anomalies is a promising and relatively unexplored approach to this problem. We present a new algorithm, referred to as <italic>task recycling</italic>, for detecting anomalies, and compare it to an existing algorithm. Empirical results indicate several significant conclusions: (i) While space requirements are bounded by &Ogr;(<italic>T</italic> × <italic>V</italic>), where <italic>T</italic> is the maximum number of threads that may potentially execute in parallel and <italic>V</italic> is the number of variable monitored, for typical programs space requirements are on average &Ogr;(<italic>V</italic>). (ii) Task recycling is more efficient in terms of space requirements and often in performance. (iii) The general approach of monitoring to detect access anomalies is practical.
[1]
Jong-Deok Choi,et al.
Techniques for debugging parallel programs with flowback analysis
,
1991,
TOPL.
[2]
Edith Schonberg,et al.
On-the-fly detection of access anomalies
,
2018,
PLDI '89.
[3]
David A. Padua,et al.
Automatic detection of nondeterminacy in parallel programs
,
1988,
PADD '88.
[4]
Jong-Deok Choi,et al.
A Mechanism for Efficient Debugging of Parallel Programs
,
1988,
PLDI.
[5]
Leslie Lamport,et al.
Time, clocks, and the ordering of events in a distributed system
,
1978,
CACM.
[6]
David Padua,et al.
Debugging Fortran on a shared memory machine
,
1987
.
[7]
Jaspal Subhlok,et al.
Static analysis of low-level synchronization
,
1988,
PADD '88.