A Brief History of Parallel Programming in Java
Concurrent programming was part of the initial Java specification, although most of the 1.x JDKs available at that time only supported concurrency at the JVM level (using so called green threads) without being able to fully benefit from the multi-core hardware. The Java language already contained the basic primitives (Thread class, wait() and notify() function calls, and the ‘synchronized’ keyword) that are still used nowdays to program modern many-core and multi-core hardware architectures.
Then progressively the JVMs evolved in order to improve mapping of to native threads (beter I/Os, faster context switching). .
As part of JSR 166, Java 5 introduced the java.util.concurrent package, which provides concurrency utilities (concurrent collections, atomic variables, locks) to ease development of concurrent programs and increase maintainability. On the performance front, the newly provided execution framework introduce a pool of reusable worker threads in order to reduce the cost of creating new (native) threads.
The next release, Java 6.0 received a small update as part of JSR 166x: mostly bug fixing and polishing, but also a few new APIs like ConcurrentSkipListMap and ConcurrentSkipSetMap.
Java 7.0, scheduled for mid 2011, will bring some new tools for parallel programming (JSR 166y), a fine-grained concurrent computation framework, some new concurrent data-structures and a new concurrent random number generator (ThreadLocalRandom). The new concurrency framework is based on the fork/join metaphor and can be used for algorithms that can be expressed using divide-and-conquer techniques. Then the work-stealing policy implemented in the framework will ensure that all the concurrent tasks are dispatched efficiently to all available threads (and thus to all available processor cores). It is also worth noticing that some other areas of the JVM are also following this trend (see for example the new thread-safe concurrent class loaders).
Some other features previously scheduled for Java 7.0 were postponed to Java 8.0 after the acquisition of Sun by Oracle (this late split is known as ‘Plan B’) and JSR 166z is supposed to cover these new enhancements. One of the main feature would be the introduction of lambda-like expressions (previously known as Project Lambda and described in JSR 335) and their use in combination with the new ParallelArray framework which provides an integration of data parallelism into the Java language.
For more information regarding , please visit