next up previous contents
Next: Message Passing Architecture Up: Programming Shared Memory Previous: Assignment:   Contents

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 contents
Next: Message Passing Architecture Up: Programming Shared Memory Previous: Assignment:   Contents
Cem Ozdogan 2006-12-27