![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 18.11.2019 20:31, deidaraXneji
Implement a solution to the producer consumer problem with the following settings (write c++ code):
there are three producers all in infinite while loops each producing 1 item in one loop.
there are three consumers all in infinite while loops each consuming 1 item in one loop.
every consumer or producer yields at the end of a loop to the next process
consider that the buffer size is 6 items.
consider that in your ready queue there are three consumers then seven producers then 7 consumers and finally three more producers .
run the code for infinitely long.
at the end of each loop before yield the consumer should print the following:
if consumer x is consuming an item then print
"this is consumer x consuming item generated by producer y"
else print
"consumer x is waiting"
at the end of each loop before yield the producer should print the following: if producer x is producing an item then print
"this is producing x producing item number y"
else print
"producer x is waiting"
![answer](/tpl/images/cats/otvet.png)
Answers: 1
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 17:30, mikemofun9079
When you type january in a cell, then copy it using the fill handle to the cells below and the data automatically changes to february, march, april, and so on, what is this feature called? auto fill automaticcopy monthfill textfill
Answers: 1
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 08:20, chloesmolinski0909
In the following table, column a is column b is and column c is
Answers: 1
Do you know the correct answer?
Implement a solution to the producer consumer problem with the following settings (write c++ code):...
Questions in other subjects:
![Konu](/tpl/images/cats/informatica.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 22.07.2019 11:00
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 22.07.2019 11:00
![Konu](/tpl/images/cats/obshestvoznanie.png)
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/istoriya.png)