Previous
Next
Table of Contents
Threads
Threads are separate sequences of operation which execute concurrently.
Threads are similar to processes.
Processes are controlled by the operating system.
Threads are controlled by a process.
Processes have their own resources.
Threads share the resources of the parent process.
Java provides control for multiple threads of execution.
Goes to "Not Runnable" if
suspend() method
sleep() method
wait() method
blocking on I/O
Goes back to "Runnable" if
resume() method
after delay
notify() method
I/O completion
Thread state diagram.
Lifted from
The Java Tutorial
(Sun Microsystems).
Demonstrations
The Incredible Machine: multiple threads of operation are created as the machine runs.
Cine display uses thread to control display rate.
Previous
Next
Table of Contents
J. Anthony Parker, MD, PhD,
Tony_Parker@bih.harvard.edu