subject

Write a program which implements a multiple producer - multiple consumer environment. Details: You will be implementing a version of the producer-consumer project from our text using the Pthreads API. The project is described generally in the attached document. I'll summarize most of the description here as well as add some additional requirements for our class. Main program Your main program will spawn off some number of producer threads and some number of consumer threads, all of which will interact through a single shared buffer. Here is the skeleton for main(): int main(int argc, char *argv[]) { /* 1. Get command line arguments */ /* 2. Initialize buffer */ /* 3. Create producer threads. */ /* 4. Create consumer threads. */ /* 5. Sleep. */ /* 6. Main thread exits. */ } Main will take 3 arguments from the command line: 1. The length of time the program should run. 2. The number of producer threads. 3. The number of consumer threads.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:20, manny2085
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
image
Computers and Technology, 24.06.2019 06:30, titalili0204
Adrawing that places all lines parallel to the z axis at an angle from the horizon is 99 ! a. an oblique drawing b. a perspective drawing c. an auxiliary view d. a one-point perspective drawing
Answers: 2
image
Computers and Technology, 24.06.2019 22:30, anselmojohn4370
Distinguish between a skill resume and a chronological resume and explain when it is best to use each format
Answers: 1
image
Computers and Technology, 25.06.2019 02:30, hailee24
What group of plants produce fruit? question 2 options: gymnosperms nonvascular plants seedless vascular plants angiosperms
Answers: 1
You know the right answer?
Write a program which implements a multiple producer - multiple consumer environment. Details: You w...

Questions in other subjects:

Konu
Biology, 23.04.2020 03:22
Konu
Mathematics, 23.04.2020 03:22