Home : Course Map : Chapter 8 : Java :
Thread Tasks
JavaTech
Course Map
Chapter 8

Introduction
Threads Overview
  Demo 1   Demo 2
Stopping Threads
Multi-Processing
Thread Tasks
Animations
 
 Demo 3   Demo 4  
  Demo 5

Non-interacting
  Demo 6

Task Splitting
  Demo 7

Exclusivity
  Demo 8

Communicating
  Demo 9

Priority/Scheduling
More Thread

Exercises

    Supplements
Java2D Animation
  Demo 1 
Processor View
More Concurrency
Cloning
  Demo 2  Demo 3 

     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

Threads are useful in many ways:

  • In situations where several things must happen at once multi-threading has great appeal. For example, a multimedia application can requre audio, video, and control processes to run in parallel. Similarly, there are often periods of waiting on slow IO systems to respond when the processor could be doing other tasks..

  • Some programs such as server/client systems are much easier to design and write with threads.

  • Some mathematical algorithms such as sorting, prime searching, etc are suitable for parallel processing.

  • On multiprocessor systems, the JVMs can put threads on different processors and thus obtain true parallel processing and get significant speedups in performance over single processor platforms.

In the following sections we will look at examples of programs that use threads. We begin with a simple animation example. We then look at cases with multiple threads and categorize them according to the degree the threads interact with each other.

 

              Tech
Timers
  Demo 1
Hist. Adapt Range
  Demo 2
Sorting in Java
  Demo 3
Histogram Median
  Demo 4
Refactoring
  Demo 5
Error Bars
  Demo 6
Exercises

           Physics
Least Squares Fit
  Demo 1
Fit to Polynomial
  Demo 2
Fit Hist Errors
  Demo 3
Discretization
  Demo 4
Timing
  Demo 5
Exercises

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.