Home » Tag Archives: Concurrency (page 9)

Tag Archives: Concurrency

Locking with a semaphore : An example

java-logo

Concurrency is one aspect that brings along interesting challenges along with it. If not correctly handled, it brings about race conditions that will baffle people because those issues just pop up from time to time and work flawlessly sometimes. The Java language gives many ways of handling race conditions when dealing with concurrent threads accessing a common resource. Some include; ...

Read More »

Log4j Thread Deadlock – A Case Study

apache-log4j-logo

This case study describes the complete root cause analysis and resolution of an Apache Log4j thread race problem affecting a Weblogic Portal 10.0 production environment. It will also demonstrate the importance of proper Java classloader knowledge when developing and supporting Java EE applications. This article is also another opportunity for you to improve your thread dump analysis skills and understand ...

Read More »

Does Immutability really means Thread Safety?

java-logo

I have often read articles telling “If an object is immutable, it is thread safe”. Actually, I have never found an article that convinces me that immutable means thread safety. Even the book by Brian Goetz Java Concurrency in Practice with its chapter on immutability did not fully satisfied me. In this book we can read word for word, in ...

Read More »

A Generic and Concurrent Object Pool

java-logo

In this post we will take a look at how we can create an object pool in Java. In recent years, the performance of the JVM has multiplied manifold that object pooling for better performance has been made almost redundant for most type of objects. In essence, creation of objects are no longer considered as expensive as it was done ...

Read More »

Project Lambda: To Multicore and Beyond

java-logo

The presentation “Project Lambda: To Multicore and Beyond” (Session 27400 and not to be confused with Brian Goetz’s presentation of the same name) was given in the Hilton San Francisco Grand Ballroom B in the early afternoon on Monday at JavaOne 2011. Even with Grand Ballroom A closed off, this is an extremely large venue for a non-keynote session and ...

Read More »

What makes parallel programming hard?

software-development-2-logo

Multi-cores are here, and they are here to stay. Industry trends show that each individual core is likely to become smaller and slower (see my post to understand the reason). Improving performance of a single program with multi-core requires that the program be split into threads that can run on multiple cores concurrently. In effect, this pushes the problem of ...

Read More »

Java Executor Service Types

java-logo

ExecutorService feature was come with Java 5. It extends Executor interface and provides thread pool feature to execute asynchronous short tasks. There are five ways to execute the tasks asyncronously by using ExecutorService interface provided Java 6. ExecutorService execService = Executors.newCachedThreadPool(); This method of the approach creates a thread pool that creates new threads as needed, but will reuse previously ...

Read More »

Java Concurrency – CyclicBarrier Example

java-logo

CyclicBarrier in Java is a synchronizer introduced in JDK 5 on java.util.Concurrent package along with other concurrent utility like Counting Semaphore, BlockingQueue, ConcurrentHashMap etc. CyclicBarrier is similar to CountDownLatch which we have seen in last article and allows multiple threads to wait for each other (barrier) before proceeding. Also difference between CoundDownLatch and CyclicBarrier is a also very popular multi-threading ...

Read More »

Native vs Green threads

software-development-2-logo

Native vs Green threads  Understanding a multi-threaded program have always been a wild goose chase for many programmers. There are always many aspects to consider when writing a multi-threaded program. Green threads vs Native Threads The difference between green threads vs native threads is something that programmers may be unaware of. Both are mechanisms are ways of achieving a ‘multi-threaded ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close