Wednesday Jul 13, 2011

Understanding the Java 7 Fork/Join Framework

An incisive and timely article by Julien Ponge, an Associate Professor in computer science at INSA de Lyon, titled “Fork and Join: Java Can Excel at Painless Parallel Programming, Too!” offers a detailed exploration of the new Java 7 fork/join framework. It begins with an explanation of low-level mechanisms involved in Java concurrent programming, then explores the rich primitives of the java.util.concurrent packages, and presents fork/join tasks plus example usage of the new APIs.

From the article itself:

“To illustrate the usage of the new fork/join framework, let us take a simple example in which we will count the occurrences of a word in a set of documents. First and foremost, fork/join tasks should operate as “pure” in-memory algorithms in which no I/O operations come into play. Also, communication between tasks through shared state should be avoided as much as possible, because that implies that locking might have to be performed. Ideally, tasks communicate only when one task forks another or when one task joins another.”

Read the complete article.

About

Insider News from the Java Team at Oracle!

duke
javeone logo
Links


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
2
5
6
7
12
13
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today