Next:
Exercise: Incomplete thread code
Up:
Shared Memory I; Processes,
Previous:
Processes
Contents
Threads
The following http://siber.cankaya.edu.tr/ParallelComputing/cfiles/code23.c program determines the sum by using threads;
Compile the code as
gcc -o sumthread code23.c -lpthread
Increase the number of the threads and change the size of array. Observe if the all the threads have the partial sum all the time. Why not?
Cem Ozdogan 2009-01-05