subject

Modified producer consumer problem: assume one producer process and n consumer processes share a bounded buffer having b slots. the producer deposits messages in the buffer; consumers fetch them. every message deposited by the producer is to be eventually received by all n consumers. furthermore, each consumer is to receive the messages in the order they were deposited. however, consumers can receive messages at different times. for example, one consumer could receive up to b more messages than another if the second consumer is slow. a) develop a monitor to synchronize the two types of threads (draw the monitor picture, give the thread execution pseudo-code, give service methods’ pseudo-code, initialization, condition variables). extensively comment your implementation. use the concept of monitors: condition variables have names, are implemented as queues with fifo policy. you can use any of the two signal policies but specify which one you use. don't use notifyall. b) is it possible for the pseudo-code of your service methods to support the other (not chosen) signal policy? if no, explain why not.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
At an open or uncontrolled intersection, yield if a. your road is paved and the crossroad is not b. the cross road is paved and yours is not c. you have two or more passengers in your vehicle d. you did not yield in the last intersection
Answers: 1
question
Computers and Technology, 22.06.2019 18:10
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
You know the right answer?
Modified producer consumer problem: assume one producer process and n consumer processes share a bo...
Questions
question
Mathematics, 27.09.2020 14:01