Abstract
Simulation and performance evaluation of concurrent Java program execution have been difficult due to the lack of proper model and tools. Previous modeling and simulation approaches cannot simultaneously achieve three tasks: (1) support the direct simulation of unmodified multi-thread Java programs; (2) guarantee deterministic simulation results; and (3) offer low-overhead and scalable simulation. This paper first presents a novel simulation model based on the Java memory model. The model axiomatically defines action ordering, relationships, and constraints to ensure the well-formedness and determinism of a simulated execution. Then, based on the model, we implement the DecompositionJ simulation framework (deterministic, concurrent multi-processsing simulation for Java programs) which enables the direct-execution simulation of target program by using compiler-based source-to-source transformation and a purposely designed runtime library. The framework is compatible with any JVM that complies with the Java specifications, and does not require manual modifications on the target program code. The performance of the framework has been evaluated with the Grande Java concurrency benchmark suite, results have shown a geometric mean of 98.9% overhead over all cases, which significantly outperforms full-system simulation techniques.
Highlights
The use of parallel and distributed computing is pervasive for a wide range of cyberphysical applications
We present a novel model and the DecompositionJ simulation framework (DEterministic, COncurrent Multi-PrOcesssing SImulaTION for Java programs) to enable the study and evaluation of multi-thread Java programs
We propose a simulation model on a language level, which is inspired by the Java Memory Model (JMM) [18]–[20]
Summary
The use of parallel and distributed computing is pervasive for a wide range of cyberphysical applications. Synchronization order is not defined in a way that can be uniquely determined, instead, any ordering that satisfies a set of validity constraints can be used and their corresponding observable behavior are allowed to be displayed in a valid execution While this relaxation is necessary for compilers and execution environments to optimize runtime performance, it is the main source of non-determinism in multi-threaded executions. A. SOURCES OF NON-DETERMINISM The causes of non-deterministic/un-repeatable behaviors in multi-thread programs and the corresponding countermeasures are summarized below: 1) Source: Actions’ execution order is not deterministically defined and enforced as explained above. Countermeasure: Java synchronization operations are modeled using lock, wait set, notify, and interrupt actions The outcomes of these actions are deterministically defined with a set of calculated relationships. Details of these elements are introduced in the later section
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have