Multi-threading in a Java environment
Java Programming Exercises | Free Java Tutorial: Java threads provide a vital performance boost to nearly all applications. These threads are becoming a standard part of Java programming as the benefit of threaded apps in Java becomes even more evident.

by Allan McNaughton, president, Technical Insights LLC. Intel Corp.

Java threads provide a vital performance boost to nearly all apps. Discover how these threads are becoming a standard part of Java programming by exploiting Hyper-Threading Technology and the new multi-core Intel® processors.

Building programs around threads of execution—that is, around specific sequences of instructions—delivers significant performance benefits. Consider, for example, a program that reads large amounts of data from disk and processes that data before writing it to the screen (such as a DVD player). On a traditional, single-threaded program (the kind most client programs use today), where only one task executes at a time, each of these activities happens as a part of a sequence of distinct phases. No data is processed until a chunk of a defined size has been read. So the program logic that could be processing the data is not executed until disk reads are complete. This leads to inferior performance.

On a threaded program, one thread can be assigned to read data, another thread to process it, and a third to write it out to the graphics card. These three threads can operate in parallel so that data is being processed while disk reads are going on. And overall performance improves. Many other examples can be devised in which the ability to do two things at once will provide better performance. The Java virtual machine (JVM) is itself heavily threaded for just this reason.

This article discusses creating multithreaded Java code, a few best-practices for designing parallel programs, and some of the tools and resources available to developers. That’s a lot to cover in one article, so I'll just highlight the salient points and direct you to resources for additional information.


If you're interested in this topic, these articles may be helpful:

Discovering Multi-Core: Extending the Benefits of Moore's Law
Learn how multi-core processor architecture and software development m...
Multithreaded .NET Web service clients: threads and responsiveness
by Ian Griffiths and Chris Sells, consultants. Intel Corp. Unresp...
Java and .NET both bring something to the party
by Paul Steinberg, Sharat Agarwal, and George Vorobiov. Intel Corp. ...
J2EE application tier tuning
by Dan Middleton, Intel Corp. This article is the second of two tha...
Ajax for Java developers: build dynamic Java applications - Ajax paves the way for better Web applications
by Philip McCarthy, software development consultant, independent consu...

Related Jobs:

Technical Writer #149616 - WA - Redmond - Microsoft Corporation
Is your dream to write for cutting-edge video games in a world-class g...
Technology Director #69247 - CA - Glendale - The Walt Disney Internet Group
Technology Director - Online posted 2/16/2007 Glendale, CA JOB...
Sr Associate Technology L1 #415 - GA - Atlanta - Sapient Corporation
Sr Associate Technology L1 Full Time Full Time posted 1/9/2006 Atla...
VR Studio - Technical Operations Tools Developer #37357 - CA - North Hollywood - The Walt Disney Internet Group
VR Studio - Technical Operations Tools Developer posted 9/19/2006 N...
Associate Technology L2 #413 - GA - Atlanta - Sapient Corporation
Associate Technology L2 Full Time Full Time posted 1/9/2006 Atlanta...
MTS3, SW #553628 - MA - Burlington - Sun Microsystems
Title: MTS3, SW Location: BURLINGTON, MA Job Role: Individual Con...
Programming Writer #132618 - WA - Redmond - Microsoft Corporation
Do you like to program? Do you like to write? Are you excited by Inter...
User Interface Programmer #15000 - CA - Woodland Hills - Activision, Inc.
User Interface Programmer Apply Online Descrip...
Senior Technical Speciali #13870 - CA - Glendale - The Walt Disney Internet Group
Senior Technical Speciali posted 5/12/2006 Glendale, CA JOB DE...
Flash Developer II #6535 - CA - San Francisco - International Game Technology
SUMMARY: The Flash Developer uses his/her software and Flash develo...