@Author: Su, Ming Yi
@Date: 05/21/2019
@Library: pthread, OpenMP, CUDA, MPI
@Background
The producer - consumer problem is a classic programming exercise in computer science.
It has both high practical benefit as well as a straight-forward implementation.
This problem is composed of two parts.
First, a “producer” creates some sort of workload, storing instructions or intermediate work in a queue.
Second, a “consumer” reads this queue, performs the desired work and produces appropriate output.
I implement the producer-consumer problem in different parallel API.
There are 6 directories.
- lab1 (serial program)
- lab2 (pthread)
- lab3 (OpenMP)
- lab4 (CUDA)
- lab5 (MPI)
- Ouput