next up previous
Next: About this document ... Up: week7l Previous: week7l

Shared Memory II; Threads, OpenMP Examples

  1. Producer-consumer using condition variables; complete the following http://siber.cankaya.edu.tr/ParallelComputing/cfiles/conprod.c code segment.
    Assignment (due to Nov 6): Implement a multi-access threaded queue with multiple threads inserting and multiple threads extracting from the queue. Use mutex-locks to synchronize access to the queue. Document the time for 1000 insertions and 1000 extractions each by 64 insertion threads (producers) and 64 extraction threads (consumers).
  2. Composite Synchronization Constructs; complete the following http://siber.cankaya.edu.tr/ParallelComputing/cfiles/barrierthread.c code segment. Plot the Exectution time vs Number of threads for nproc=2.
  3. OpenMP; two examples are given; http://siber.cankaya.edu.tr/ParallelComputing/cfiles/omp_hello.c hello, http://siber.cankaya.edu.tr/ParallelComputing/cfiles/workshare1.c workshare

next up previous
Next: About this document ... Up: week7l Previous: week7l
Cem Ozdogan 2006-11-28