Java 7 Will Evolve to Fine-grained Parallelism
Java's development team understands the multicore revolution and is working hard in offering a new concurrency framework taking into account the new possibilities offered by the new microprocessors. Hence, JDK 7 (Java Development Kit 7) will offer the fork-join framework in order to help Java developers to tackle the multicore revolution using this popular programming language.
I'm going to borrow some words from Charles Darwin's "The Origin of the Species" and his theory of evolution: "In a very real sense, nature selected the best adapted varieties to survive and to reproduce. This process has come to be known as natural selection."
I'm pretty sure that developers will select the best adapted programming languages to survive in the parallelism age. This process is also known as natural selection. Programming languages that do not evolve to support multicore programming won't have chances to survive in this new era. Luckily, JDK 7 will offer many improvements that will seduce multicore programmers.
Java supports multithreading since its first version. However, multicore microprocessors were not available when Java was born. This old threading model was useful to create more responsive applications using only one processing core, but it wasn’t prepared for high concurrency levels. This model is not suitable for multicore programming that requires many concurrent tasks taking full advantage of all the available cores.
JDK 5 added support for coarse-grained concurrency. However, this model is suitable for multiprocessor systems (MP systems). Therefore, JDK 7 adds support for fine-grained parallelism, offering the developers the possibility to exploit multicore microprocessors using the new fork-join framework.
Definitely, Java is evolving to survive the multicore revolution.
This new framework offers the possibility of working with tasks, instead of using more expensive threads. For example, the new package java.util.concurrent.forkjoin, proposed for JDK 7 release offers the following useful base classes:
* RecursiveAction: To represent divide-and-conquer solutions.
* RecursiveTask: To represent result-bearing tasks.
* AsyncAction: To work with tasks that require asynchronous completion.
* CyclicAction: To work with parallel iterative tasks.
The new fork-join tasks are designed to minimize the overhead and to improve the performance offered by compute-intensive tasks. Besides, the code is easier to understand than the old threaded version and the developers require less synchronization.
This new framework is very useful for compute-intensive tasks running on multicore CPUs.
There are many other features that will be available in JDK 7, like the new ParallelArray. However, I wanted to keep the focus on a short and simple introduction to the new fork-join framework.
Java is evolving. Thus, Java developers must also evolve to take advantage of these forthcoming features.
For more details, go here and watch the excellent slides of "Let’s Resync. Concurrency Features in JDK 7", by Brian Goetz, Sr. Staff Engineer, Sun Microsystems.
Parallel Pattern 5: Stencil
All memory addresses used for reads are expressed as offsets
Distributing Work Across Cores Using .NET
A roll-your-own ThreadPool implementationLooking For The Lost Packets: Part 2
Looking For The Lost Packets: Part 1
- Intel Parallel Studio; Download the free eval today!
- Parallelism Breakthrough Video Series; Watch and learn more about Intel® Parallel Studio
- 2009 Intel Software Webinar Series; View On-Demand webinars
- Coding for Multi-core Processes; Intel® Compiler Pro eBook
- Performance Through Parallelism; Intel® Tuning for Vista eBook
- Intel® Software Network; Connect with developers and Intel engineers
-
February 18, 2010
Lock Contention, Using Intel Parallel Studio to Improve Performance
Speaker: Vasanth Tovinkere, Software Engineer, Intel Corporation (Bio)Vasanth Tovinkere is a software engineer in the Developer Products Division (DPD) at Intel. His current role involves defining novel approaches to understanding and visualizing parallel performance and consulting with strategic customers to help them prepare and deliver code for the multicore world. Vasanth has been involved in the development of automatic semantic event detectors for digital sports technologies in Intel Labs. He also has been awarded three patents and has two patents pending.
Abstract:
Discover how easy it is to use the power of Microsoft Visual Studio and Intel Parallel Studio to find performance issues due to lock contention in threaded applications. This ensures that shipped applications can take better advantage of multicore processors. In this webcast, we provide live demonstrations that show how to identify lock contentions issues with Visual Studio and Intel Parallel Studio, an add-in to Visual Studio that helps developers create fast, reliable code on multicore processors.t.



