Next: Creating and managing threads
Up: No Title
Previous: Background
The basic entity for programming multi-processor machines are
threads. They represent parts of the program which are executed in
parallel. Threads can be considered as separate programs that work on the same
main memory. On single-processor machines, they are simulated by letting each
thread run for some time (usually a few milliseconds) before switching to the
next thread. On multi-processor machines, threads can truly be executed in
parallel. In order to let programs use more than one thread (which would be
the regular sequential program), several aspects need to be covered:
- How do we assign operations to different threads? Of course, operations
which depend on each other must not be executed in reverse order. This can
be achieved by only letting independent operations run on different threads,
or by using synchronization methods. this is mostly a question of program
design and thus problem dependent, which is why both aspects will only be
briefly touched below.
- How does the operating system and the whole programming environment
support this?
As mentioned, only the second aspect can be canonicalized, so we will treat it
first. Some examples of actual parallelized applications are discussed in
Section 4.
Next: Creating and managing threads
Up: No Title
Previous: Background
Wolfgang Bangerth
2000-04-20