1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
attashe74 [19]
3 years ago
10

Design an algorithm for a bounded-buffer monitor in which the buffers (portions) are embedded within the monitor itself."

Computers and Technology
1 answer:
sattari [20]3 years ago
5 0

Answer:

Required code is given below:

Explanation:

monitor bounded buffer {

int items[MAX ITEMS];

int numItems = 0;

condition full, empty;

void produce(int v)

{

while (numItems == MAX ITEMS) full.wait();

items[numItems++] = v;

empty.signal();

}

int consume()

{

int retVal;

while (numItems == 0) empty.wait();

retVal = items[--numItems];

full.signal();

return retVal;

}

}

You might be interested in
Which of the following does not make a good analysis class? (Points : 6) its name reflects its intent
satela [25.4K]

Answer:it has high coupling

Explanation: Coupling is the property in the field of computer program that is defined as the functions ,data and  codes of the program are dependent on each other and cannot be changed independently if requires. Thus,high amount of coupling is not considered as good factor due to high interdependence. Loose coupling can be still permitted.

Other options are correct because name of the class should reflect the purpose and well defined responsibilities should be present, modeling of certain component and high cohesion means keeping similar functions togather is also required. So, the only bad factor is high coupling

6 0
2 years ago
What is heaven backwards?
sweet-ann [11.9K]
It is Nevaeh backwards hope that helps! :3 and feel free to pm me if you have anymore questions! :3
5 0
2 years ago
Read 2 more answers
Give me a code that draws a house with a roof in python. Please Answer!!!
Varvara68 [4.7K]

import turtle

window = turtle.Screen()

tr = turtle.Turtle()

tr.forward(100)

tr.left(90)

tr.forward(100)

tr.left(90)

tr.forward(100)

tr.left(90)

tr.forward(100)

tr.back(100)

tr.left(120)

tr.forward(75)

tr.right(78)

tr.forward(60)

window.mainloop()

In my code, we use the turtle module for the graphics to draw the house with a roof.

8 0
2 years ago
Enzymes_____________.
lord [1]

Answer:

b. speed up chemical reactions.

Explanation:

brainly plz

4 0
2 years ago
How does speech recognition software know what you are saying?
boyakko [2]
It converts the mic input into a string of raw data, then compares it to hundreds, even thousands of voice samples. The output is a polished string of data in words.
8 0
3 years ago
Other questions:
  • Which of the following statements is true with regards to satellite Internet access?
    13·2 answers
  • Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​
    6·1 answer
  • 1. What are the built-in operations on classes?
    8·1 answer
  • What is the difference between line art and continuous tone copy?
    14·1 answer
  • Which part of the operating system enables you to interact with the device? Question 9 options: The graphical user interface The
    8·1 answer
  • Graphic software task​
    7·1 answer
  • I love science its my favorite subject
    13·2 answers
  • For any element in keysList with a value smaller than 40, print the corresponding value in itemsList, followed by a comma (no sp
    6·1 answer
  • Which of the following statements about recommendation engines is TRUE?A: An online recommendation engine is a set of algorithms
    10·1 answer
  • The condition known as __________ occurs when you try to store an integer that is bigger than the maximum allowed by the number
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!