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 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
question
Computers and Technology, 24.06.2019 22:10
Function name: poly parameters: int returns: int description: a polynomial of degree n with coefficients a0,a1,a2,a3, . . ,an is the function p(x) = a0+a1x+a2x2+a3 ∗ x3+ . . +an ∗ xn this function can be evaluated at different values of x. for example, if: p(x) = 1+2x+ x2, then p(2) = 1+2 ∗ 2+22 = 9. if p(x) = 1+x2+x4, then p(2) = 21 and p(3) = 91. write a function poly() that takes as input a list of coefficients a0, a1, a2, a3, . . , an of a polynomial p(x) and a value x. the function will return poly(x), which is the value of the polynomial when evaluated at x.
Answers: 3
You know the right answer?
Modified producer consumer problem: assume one producer process and n consumer processes share a bo...
Questions
question
Mathematics, 12.05.2021 21:50
question
Mathematics, 12.05.2021 21:50
question
Mathematics, 12.05.2021 21:50
question
Mathematics, 12.05.2021 21:50
Questions on the website: 13722367