Prior to the release of JDK 5.0, the Java platform provided basic primitives for writing concurrent programs, but they were just that – primitive – and difficult to use properly. In addition to many new high-level concurrency utilities, such as semaphores, mutexes, barriers, thread pools, and thread-safe collections, JDK 5.0 also includes a number of JVM-level enhancements for concurrency, and a set of low-level concurrency utilities for developing highly scalable, nonblocking concurrent algorithms in Java.
Even with built-in support for locking, it has not been practical to develop nonblocking concurrent algorithms in Java prior to JDK 5.0. With JVM support for accessing hardware-provided concurrency instructions (such as CAS) and the atomic variable classes provided in java.util.concurrent.atomic, it is now possible to develop highly scalable, wait-free, lock-free classes in Java.
more...