subject
Physics, 26.03.2021 18:40 jaleahwalker

Submit to Webcourses the developed concurrency. cm source code fileAssignment requirements1. Two producers2. Two consumers3. Mutual exclusion4. Single buffer with maximum size 10 elements5. Maximum 30 items produced and consumed for each producer-consumer pair TasksActivityconcurrency. cm1. Create a new CM source code file named concurrency. cm2. Declare the following global variables a. Data type semaphore named full b. Data type semaphore named emptyc. Data type semaphore named mutexd. Constant integer, value 10, for the maximum size of the buffer that stores the produced itemse. Integer array with the size as defined in step d. f. Constant integer, value 30, for the maximum number of produced items for each producer3. Write function producer to do the following a. Return type void b. Parameter list receives one integer designating the producer number (1.e. producer 1, producer 2) c. Loop while the producer has not produced the maximum of 30 items i. Apply exclusive lock on semaphores (i. e. wait or p) ii. Produce the item iii. Add item to buffer iv. Output to screen the produced item v. Calculate the next position in the buffer for the next item vi. Unlock semaphores (i. e. signal or v)

ansver
Answers: 3

Another question on Physics

question
Physics, 22.06.2019 09:10
The air that we breath is made mostly of which gaseous molecule
Answers: 1
question
Physics, 22.06.2019 23:30
An astronaut on the moon throws a baseball upward. the astronaut is 6 ft, 6 in. tall, and the initial velocity of the ball is 3030 ft per sec. the height s of the ball in feet is given by the equation s equals negative 2.7 t squared plus 30 t plus 6.5s=−2.7t2+30t+6.5, where t is the number of seconds after the ball was thrown. complete parts a and b.
Answers: 2
question
Physics, 22.06.2019 23:30
Which system of units is used by only a small number of countries in the world, including the u.s.
Answers: 3
question
Physics, 23.06.2019 00:10
Acar of mass 800kg is moving at a speed of 2.2m/s.
Answers: 1
You know the right answer?
Submit to Webcourses the developed concurrency. cm source code fileAssignment requirements1. Two pro...
Questions
question
Chemistry, 21.07.2020 21:01
question
Mathematics, 21.07.2020 21:01
question
Mathematics, 21.07.2020 21:01