vJUG24 Session: Turbo Charge CPU Utilization in Fork/Join Using the ManagedBlocker

Session Abstract:

Fork/Join is a framework for parallelizing calculations using recursive decomposition, also called divide and conquer. These algorithms occasionally end up duplicating work, especially at the beginning of the run. We can reduce wasted CPU cycles by implementing a reserved caching scheme. Before a task starts its calculation, it tries to reserve an entry in the shared map. If it is successful, it immediately begins. If not, it blocks until the other thread has finished its calculation. Unfortunately this might result in a significant number of blocked threads, decreasing CPU utilization. In this talk we will demonstrate this issue and offer a solution in the form of the ManagedBlocker. Combined with the Fork/Join, it can keep parallelism at the desired level.

Speaker: Heinz Kabutz

Dr. Heinz Kabutz is the mastermind behind The Java Specialists’ Newsletter. He has a PhD in Computer Science. Heinz has programmed significant portions of several large Java applications and has taught Java to thousands of professional programmers. He is a regular speaker at all the major Java conferences.

Heinz was chosen as a Java Champion by Sun Microsystems, the inventors of Java, for his work in advancing Java.

Heinz presents all Java Specialist training courses anywhere in the world, either in person or via remote teaching technologies. He is the author of all their courses, including Java Specialist Master, Design Patterns and Concurrency Specialist Courses.