Home » Tag Archives: Concurrency (page 18)

Tag Archives: Concurrency

How to Avoid ConcurrentModificationException when using an Iterator

Java Collection classes are fail-fast which means that if the Collection will be changed while some thread is traversing over it using iterator, the iterator.next() will throw a ConcurrentModificationException. This situation can come in case of multithreaded as well as single threaded environment. Lets explore this scenario with the following example: import java.util.*; public class IteratorExample { public static void ...

Read More »

Java Fork/Join for Parallel Programming

The last few years a paradigm shift is taking place in the field of computer processors. For years, processor makers consistently delivered increases in clock rates, so developers enjoyed the fact that their single-threaded software executed faster without any effort from their part. Now, processor makers favor multi-core chip designs, and software has to be written in a multi-threaded or ...

Read More »

Java Memory Model – Quick overview and things to notice

In computing, a Memory model describes how threads interact through memory, or more generally specify what assumptions the compiler is allowed to make when generating code for segmented memory or paged memory platforms. It essentially describes, given a program and an execution trace of that program, whether the execution trace is a legal execution of the program. The Java memory ...

Read More »

How to Do 100K TPS at Less than 1ms Latency

java-interview-questions-answers

Martin Thompson and Michael Barker talk about building a HPC financial system handling over 100K TPS at less than 1ms latency by having a new approach to infrastructure and software. Some of the tips include: Understand the platform Model the domain Create a clear separation of concerns Choose data structures wisely Run business logic on a single thread The presentation that ...

Read More »

ConcurrentLinkedHashMap v 1.0.1 released

Hello all, we released version 1.0.1 of our concurrent LinkedHashMap implementation. In the latest version several minor modifications have been made so as to improve performance when multiple threads iterate over the elements of the map. The latest version also introduces pluggable eviction policies. Of course you can implement custom eviction policies and use them with out ConcurrentLinkedHashMap as well. ...

Read More »

Java Best Practices – Queue battle and the Linked ConcurrentHashMap

Continuing our series of articles concerning proposed practices while working with the Java programming language, we are going to perform a performance comparison between four popular Queue implementation classes with relevant semantics. To make things more realistic we are going to test against a multi–threading environment so as to discuss and demonstrate how to utilize ArrayBlockingQueue, ConcurrentLinkedQueue, LinkedBlockingQueue and/or LinkedList ...

Read More »