IMPLEMENTATION AND OPTIMIZATION OF THREAD-LOCAL VARIABLES FOR A RACE-FREE JAVA DIALECT by
Bibliographic record
Abstract
Despite the popularity of Java, problems may arise from potential data-race conditionsduring execution of a Java program. Data-races are considered errors in concurrent pro-gramming languages and greatly complicate both programming and runtime optimizationefforts. A race-free version of Java is therefore desirable as a way of avoiding this com-plexity and simplifying the programming model.This thesis is part of work trying to build a race-free version of Java. It implements andoptimizes thread-local accesses and comes up with a new semantics for this language. Animportant part of implementing a language without races is to distinguish thread-local datafrom shared data because these two groups of data need to be treated differently. This iscomplex in Java because in the current Java semantics all objects are allocated on a singleheap and implicitly shared by multiple threads. Furthermore, while Java does provide amechanism for thread-local storage, it is awkward to use and inefficient.Many of the new concurrent programming languages, such as OpenMP, UPC, and D,use "sharing directives" to distinguish shared data from thread-local data, and have fea-tures that make heavy use of thread-local data. Our goal here is to apply some of theselanguage ideas to a Java context in order to provide a simpler and less error-prone pro-gramming model. When porting such features as part of a language extension to Java,however, performance can suffer due to the simple, map-based implementation of Java'sbuilt-in ThreadLocal class. We implement an optimized mechanism based on program-mer annotations that can efficiently ensure class and instance variables are only accessed bytheir owner thread. Both class and instance variables inherit values from the parent threadthrough deep copying, allowing all the reachable objects of child threads to have localcopies if syntactically specified. In particular, class variable access involves direct accessto thread-local variables through a localized heap, which is faster and easier than the defaultmap mechanism defined for ThreadLocal objects. Our design improves performance sig-nificantly over the traditional thread-local access method for class variables and providesa simplified and more appealing syntax for doing so. We further evaluate our approach bymodifying non-trivial, existing benchmarks to make better use of thread-local features, il-lustrating feasibility and allowing us to measure the performance in realistic contexts. Thiswork is intended to bring us closer to designs for a complete race-free version of Java, aswell as show how improved support for use of thread-local data could be implemented inother languages.
Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.
How this classification was reachedexpand
Full frame machine prediction
Teacher imitationNot calibrated prevalence, not ground truth. Human validation pending. The Gemma side is a direct model label for every work in the frame, read from the title-only record. The Codex side is a classifier learned from the 10,348 direct Codex labels and calibrated to design-weighted sample rates; fields without enough sample support carry no Codex call. Candidate is the union of the two sides; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels.
Distilled classifier scores by category (both heads)
| Category | Codex | Gemma |
|---|---|---|
| Metaresearch | 0.003 | 0.004 |
| Meta-epidemiology (narrow) | 0.001 | 0.001 |
| Meta-epidemiology (broad) | 0.001 | 0.001 |
| Bibliometrics | 0.001 | 0.000 |
| Science and technology studies | 0.001 | 0.001 |
| Scholarly communication | 0.003 | 0.003 |
| Open science | 0.003 | 0.003 |
| Research integrity | 0.001 | 0.003 |
| Insufficient payload (model declined to judge) | 0.011 | 0.004 |
Machine scores (provisional)
The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.
Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.
score_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from itClassification
machine, unvalidatedMachine predicted; a candidate call from one source (direct Gemma or distilled Codex), not a consensus.
How this classification was reached, model by model and score by score, is at the end of the page under "How this classification was reached".