|
[ Publications ]
[ Research Opportunities ]
[ Partners & Supporters ]
[ Earlier Work ]
|
|
Compiling Multi-Threaded Object-Oriented Programs
|
| Christoph von Praun,
Thomas Gross,
Compiling Multi-Threaded Object-Oriented Programs, Record of International Workshop on Compilers for Parallel Computers (CPC), January 2003.
[CPC_2003.pdf]
|
|
A compiler must take special care when translating and transforming a
multi-threaded program: The presence of synchronization operations and
the potential of access conflicts have implications on register
allocation and instruction scheduling. Moreover, a compiler might want
to inhibit hardware assisted instruction reordering through memory
fences, to enable a strong memory model on a platform with weakly
ordered memory semantics.
Unless the language or user asserts that an input program is free from
'access conflicts', the compiler must be aware of the concurrency and
the data sharing in a program, to guarantee that the output program
complies with a certain (well-defined) program semantics.
This paper reports on an approach to compile
multi-threaded object-oriented programs sharing data
on a global heap. We developed a whole-program analysis that
determines compile-time abstractions for threads and objects. Beyond
escape information, the analysis determines the use and update actions
of threads to objects and their approximated happens-before ordering.
This information is used to implement two variants of sparse
instrumentation, addressing the problem of access conflict detection
in concurrent programs: (1) Object Race Detection checks if accesses
to objects follow a locking discipline at runtime. (2) Object
Consistency verifies if threads behave such that accesses to objects
happen in a serializable order. Overlapping object accesses, which
entail the possibility of data corruption, are detected.
|
|
[ Publications ]
[ Research Opportunities ]
[ Partners & Supporters ]
[ Earlier Work ]
|
|