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 00:30
Order the sequence of ideas that lead to marie curies discovery of radioactive elements number the events in chronological order starting with the oldest
Answers: 2
question
Physics, 22.06.2019 10:00
In a heat engine if 1000 j of heat enters the system the piston does 500 j of work, what is the final internal energy of the system if the initial energy was 2000 j? 1. write the equation 2.list out your known variables 3.plug the numbers into the equations 4.solve 5.write your solution statement that includes initial energy and final
Answers: 3
question
Physics, 22.06.2019 11:00
Is the time in tennessee the same as florida
Answers: 1
question
Physics, 22.06.2019 13:00
4. if you were an astronaut on the moon, what would you experience? what would you see from your perspective?
Answers: 1
You know the right answer?
Submit to Webcourses the developed concurrency. cm source code fileAssignment requirements1. Two pro...
Questions
question
Mathematics, 08.03.2020 05:05
question
English, 08.03.2020 05:09
question
English, 08.03.2020 05:10
Questions on the website: 13722363