Contents Up << >>
Disadvantages
The above advantages are not free of cost. The disadvantages
include:
- Increased memory usage.
The workers threads allocate memory to store their intermediate
results. When the worker threads finish, the supervisor allocates
memory for the final result and collates the results for the
workers. This collation results in a doubling of the memory
requirements. Of course, after collation the supervisor releases
the memory used by the workers.
- Slower execution on single CPU systems.
Creating multiple threads, sending progress messages to the
background manager, and collation of results for worker threads
adds overhead compared to simply calculating the result directly
in the foreground. On single CPU systems this results in slower
processing compared to foreground processing. On dual-CPU and
greater SMP systems, though, the advantage of using multiple CPU's
in parallel exceeds the overhead of background processing.