Skip to content
Free planNo credit card requiredStart writing

Search 250 million research papers

Read the abstract, see who wrote it and who cites it, and get the citation in APA, MLA, Chicago or Harvard.

About 858 papers for “Java concurrency”

Java Concurrency Guidelines

Fred Long, Dhruv Mohindra, Robert C. Seacord et al. · Figshare · 2010

An essential element of secure coding in the Java programming language is well-documented and enforceable coding standards. Coding standards encourage programmers to follow a uniform set of guidelines determined by the requirements of the project and organization, rather than by the programmer's familiarity or preference. Once established, these standards can be used as a metric to evaluate source code (using manual or automated processes). The CERT Oracle Secure Coding Standard for Java provides guidelines for secure coding in the Java programming language. The goal of these guidelines is to eliminate insecure coding practices and undefined behaviors that can lead to exploitable vulnerabilities. Applying this standard will lead to higher quality systems that are robust and more resistant to attack. This report documents the portion of those Java guidelines that are related to concurrency.

Cited by 6Open access

Structured Concurrency in Java

Los Angeles, USA, Nilesh Jagnik · 2023

Concurrency is vital for high performance software applications. The Java language has support for concurrency but it requires developers to handle execution of concurrent tasks. This adds a learning curve and makes concurrent code harder to read, write and debug. To solve this issue, Java 21 introduces a preview feature called structured concurrency. In this paper, we review the idea behind structured concurrency and discuss how the new language feature works in Java.

Cited by 0Open access

JAC: declarative Java concurrency

Max Haustein, Klaus-Peter Löhr · 2005

The Java programming language has a low-level concurrency model which is hard to use and does not blend well with inheritance. JAC is an extension of Java that introduces a higher level of concurrency, hiding threads and separating thread synchronization from application logic in a declarative fashion. The emphasis is on limiting the differences between sequential and concurrent code, thus furthering code reuse, and on avoiding inheritance anomalies. This is achieved by taking a middle road between concurrent code on the one hand and complete separation of sequential application logic from concurrency mechanisms on the other. An extensive comparison with related approaches is given for motivating our design decisions.

Cited by 0

Java Concurrency in Practice

Tim Peierls, Brian Goetz, Joshua Bloch et al. · Medical Entomology and Zoology · 2006

was fortunate indeed to have worked with a fantastic team on the design and implementation of the concurrency features added to the Java platform in Java 5.0 and Java 6. Now this same team provides the best explanation yet of these new features, and of concurrency in general. Concurrency is no longer a subject for advanced users only. Every Java developer should read this book. --Martin Buchholz JDK Concurrency Czar, Sun MicrosystemsFor the past 30 years, computer performance has been driven by Moore's Law; from now on, it will be driven by Amdahl's Law. Writing code that effectively exploits multiple processors can be very challenging. Java Concurrency in Practice provides you with the concepts and techniques needed to write safe and scalable Java programs for today's--and tomorrow's--systems. --Doron Rajwan Research Scientist, Intel CorpThis is the book you need if you're writing--or designing, or debugging, or maintaining, or contemplating--multithreaded Java programs. If you've ever had to synchronize a method and you weren't sure why, you owe it to yourself and your users to read this book, cover to cover. --Ted Neward Author of Effective Enterprise JavaBrian addresses the fundamental issues and complexities of concurrency with uncommon clarity. This book is a must-read for anyone who uses threads and cares about performance. --Kirk Pepperdine CTO, JavaPerformanceTuning.comThis book covers a very deep and subtle topic in a very clear and concise way, making it the perfect Java Concurrency reference manual. Each page is filled with the problems (and solutions!) that programmers struggle with every day. Effectively exploiting concurrency is becoming more and more important now that Moore's Law is delivering more cores but not faster cores, and this book will show you how to do it. --Dr. Cliff Click Senior Software Engineer, Azul SystemsI have a strong interest in concurrency, and have probably written more thread deadlocks and made more synchronization mistakes than most programmers. Brian's book is the most readable on the topic of threading and concurrency in Java, and deals with this difficult subject with a wonderful hands-on approach. This is a book I am recommending to all my readers of The Java Specialists' Newsletter, because it is interesting, useful, and relevant to the problems facing Java developers today. --Dr. Heinz Kabutz The Java Specialists' NewsletterI've focused a career on simplifying simple problems, but this book ambitiously and effectively works to simplify a complex but critical subject: concurrency. Java Concurrency in Practice is revolutionary in its approach, smooth and easy in style, and timely in its delivery--it's destined to be a very important book. --Bruce Tate Author of Beyond JavaJava Concurrency in Practice is an invaluable compilation of threading know-how for Java developers. I found reading this book intellectually exciting, in part because it is an excellent introduction to Java's concurrency API, but mostly because it captures in a thorough and accessible way expert knowledge on threading not easily found elsewhere. --Bill Venners Author of Inside the Java Virtual MachineThreads are a fundamental part of the Java platform. As multicore processors become the norm, using concurrency effectively becomes essential for building high-performance applications. Java SE 5 and 6 are a huge step forward for the development of concurrent applications, with improvements to the Java Virtual Machine to support high-performance, highly scalable concurrent classes and a rich set of new concurrency building blocks. In Java Concurrency in Practice, the creators of these new facilities explain not only how they work and how to use them, but also the motivation and design patterns behind them.However, developing, testing, and debugging multithreaded programs can still be very difficult; it is all too easy to create concurrent programs that appear to work, but fail when it matters most: in production, under heavy load. Java Concurrency in Practice arms readers with both the theoretical underpinnings and concrete techniques for building reliable, scalable, maintainable concurrent applications. Rather than simply offering an inventory of concurrency APIs and mechanisms, it provides design rules, patterns, and mental models that make it easier to build concurrent programs that are both correct and performant.This book covers: Basic concepts of concurrency and thread safety Techniques for building and composing thread-safe classes Using the concurrency building blocks in java.util.concurrent Performance optimization dos and don'ts Testing concurrent programs Advanced topics such as atomic variables, nonblocking algorithms, and the Java Memory Model

Cited by 405

Java 7 concurrency cookbook

González, Javier Fernández · CERN Document Server (European Organization for Nuclear Research) · 2012

Cited by 0

Refactoring for Java-Structured Concurrency

Yang Zhang, Gaojie Shen, Liyan Zhang et al. · Applied Sciences · 2025

Structured concurrency treats multiple tasks running in different threads as a single unit, thereby improving reliability and enhancing observability. The existing IDE (Integrated Development Environment) does not provide sufficient support to leverage such an advanced structure and conduct refactoring automatically. Manual refactoring is tedious and error prone. There is an urgent need to provide adequate support to perform automatic refactoring. To this end, this paper proposes ReStruct, an automatic refactoring approach to transform unstructured concurrency to structured concurrency. ReStruct first employs visitor pattern analysis to acquire the target code for refactoring and then performs a precondition to filter out the code that meets the refactoring criteria. Subsequently, it performs scope analysis to guide the refactoring process. Finally, ReStruct performs refactoring on the AST of the source program. ReStruct is implemented as an Eclipse plugin and is evaluated in seven real-world projects via the number of refactorings and changes to LOCs (lines of code), time, and performance after refactoring. The experimental results illustrate that a total of 82 unstructured codes are refactored, with an average of 27.3 s per project. Furthermore, the performances of these refactored projects are improved by an average of 6.5%, demonstrating its effectiveness.

Cited by 0Open access

Noninvasive concurrency with Java STM

Guy Korl, Nir Shavit, Pascal Felber · 2013

Abstract. In this paper we present a complete Java STM framework, called Deuce, intended as a platform for developing scalable concurrent applications and as a research tool for designing new STM algorithms. It was not clear if one could build an e cient Java STM without compiler support. Deuce provides several bene ts over existing Java STM frameworks: it avoids any changes or additions to the JVM, it does not require language extensions or intrusive APIs, and it does not impose any memory footprint or GC overhead. To support legacy libraries, Deuce dynamically instruments classes at load time and uses an original eld-based locking strategy to improve concurrency. Deuce also provides a simple internal API allowing di erent STMs algorithms to be plugged in. We show empirical results that highlight the scalability of our framework running benchmarks with hundreds of concurrent threads. This paper shows for the rst time that one can actually design a Java STM with reasonable performance without compiler support. 1

Cited by 0

Concurrency Analysis of Go and Java

Prince Abhinav, Avakash Bhat, Christina Terese Joseph et al. · 2020 5th International Conference on Computing, Communication and Security (ICCCS) · 2020

There has been tremendous progress in the past few decades towards developing applications that receive data and send data concurrently. In such a day and age, there is a requirement for a language that can perform optimally in such environments. Currently, the two most popular languages in that respect are Go and Java. In this paper, we look to analyze the concurrency features of Go and Java through a complete programming language performance analysis, looking at their compile time, run time, binary sizes and the language's unique concurrency features. This is done by experimenting with the two languages using the matrix multiplication and PageRank algorithms. To the extent of our knowledge, this is the first work which used PageRank algorithm to analyse concurrency. Considering the results of this paper, application developers and researchers can hypothesize on an appropriate language to use for their concurrent programming activity.Results of this paper show that Go performs better for fewer number of computation but is soon taken over by Java as the number of computations drastically increase. This trend is shown to be the opposite when thread creation and management is considered where Java performs better with fewer computation but Go does better later on. Regarding concurrency features both Java with its Executor Service library and Go had their own advantages that made them better for specific applications.

Cited by 4

Concurrency in Java and in Erlang

Sven-Olof Nystrom Department, Sven-olof Nyström · 2007

en run on an other OS. When two Java threads in an application communicate, they normally do so by updating shared objects. An update of an object might involve several operations, and to ensure that no other process can access an object while one process is updating it, Java o#ers primitives for synchronization. Unfortunately, synchronization is relatively costly (compared to the same accesses without synchronization). Worse, synchronization may sometimes cause deadlocks. But not doing synchronization will result in race conditions, which is equally bad. An older version of Sun's tutorial How to use threads began with the following not so encouraging words: The first rule of using threads is this: avoid them if you can. Threads can be di#cult to use, and they tend to make programs harder to debug. To avoid the possibility of deadlock, you must take extreme care that any threads you create don't invoke any methods on Swing components. 2 Concurrency in Erlang Erlang [2] is a concu

Cited by 0

Comparison of Concurrency Technologies in Java

Gustafsson, Elias, Nederlund Persson, Oliver · Lund University Publications Student Papers (Lund University) · 2024

This study was conducted in order to test the performance of Java's virtual threads against platform threads and reactive systems in the context of a high load server / client system.As virtual threads were only introduced in Java 21 (2023) they have yet to be thoroughly tested.We took great care to ensure that the constraints of the testing environment did not unduly influence the results.The experiments were designed to test performance in several ways, entailing methods with various mixes of simulated IO operations and computational tasks.In regards to pure computational operations, neither virtual threads nor reactive streams outperformed regular platform threads.However, when it came to IO-heavy operations both of the high-concurrency technologies performed significantly better than platform threads.Reactive streams utilized significantly less memory and had fewer fluctuations, while virtual threads had much lower latencies.For instance, latencies for virtual threads where up to 44% shorter than for reactive in the 99th percentile for the IO tests, and had the best performance in three out of four benchmarks.Reactive had about half the memory usage of virtual threads in three out of four benchmarks, and had the best memory performance in all four benchmarks.Because of their different strengths and performance that varies with the benchmark composition, we cannot conclude that either one of the technologies is generally better.Rather it is a matter of what metrics to prioritize.In our report, we provide all of the data from the benchmarks and explain the testing methodology in detail.In order to provide some guidelines, we can state that virtual threads and reactive performed better than platform threads in the benchmarks containing blocking operations, and that virtual threads were generally faster than reactive.However reactive was more stable and memory efficient than both virtual-and platform threads.

Cited by 0Open access

Synchronous Java: Light-Weight, Deterministic Concurrency and Preemption in Java

Motika, Christian, von Hanxleden, Reinhard, Heinold, Mirko · MACAU (Kiel University) · 2012

A key issue in the development of reliable embedded software is the proper handling of reactive controlow, which typically involves concurrency. Java and its thread concept have only limited provisions for implementing deterministic concurrency. Thus, as has been observed in the past, it is challenging to develop concurrent Java programs without any deadlocks or race conditions. To alleviate this situation, the Synchronous Java (SJ) approach presented her adopts the key concepts that have been established in the world of syschronous programming for handling reactive controlow. Thus SJ not only provides deterministic concurrency, but also dierent variants of deterministic preemption. Furthermore SJ allows concurrent threads to communicate with Esterel-style signals. As a case study for an embedded system usage, we also report on how the SJ concepts have been applied in the context of Lego Mindstorms.

Cited by 0

Checking Java Concurrency Design Patterns Using Bandera

Cleidson R. B. de Souza, Roberto S. Silva Filho · 2007

Software patterns express a generic solution for a specific design problem, conveying some knowledge and expertise from designers. Model checking is an automatic technique for verifying finite state systems that determines if a property holds of the given finite state machine. The paper describes the experience of the authors in modeling three concurrency design patterns using the Bandera toolset for model checking. The concurrency properties of these patterns were specified using the BASL language and submitted for checking after the relaxation of the code. Due to some problems related to the immaturity of the tool, only one model could be checked, in one special property. The main contribution of the paper is the formalization of the patterns and the sequence of steps followed in order to formalize and check these patterns. Key Words: Pattern verification, Design Patterns, Model Checking, Software Specification. 1. Introduction Software patterns [Gamma94] facilitate reuse of well-...

Cited by 0