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]
4 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]4 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
Differentiate between smudge and dodge tool.​
Pavlova-9 [17]

Answer:

They are the same as the clone tool.

Explanation:

4 0
2 years ago
Which type of operating system is usually used in personal computers?
babunello [35]

Answer:

Windows and Mac OS

Explanation:

8 0
3 years ago
A computer lab has two printers. Printer I handles 40% of all the jobs. Its printing time is Exponential with the mean of 2 minu
Dennis_Churaev [7]

Answer:  0.3042

Explanation:

Let A  and B are the events to that job done by Printer I and Printer II respectively.

Given : P(A)=0.40    P(B)=0.60

Printing time of Printer I is Exponential with the mean of 2 minutes.

i.e. average number of job done in one minute:\lambda=\dfrac{1}{2}

The cumulative distribution function (CDF) for exponential distribution:-

F(x)=1-e^{-\lambda x}, where \lambda is the mean.

Then, the cumulative distribution function (CDF) for Printer I:-

P(X|A)=1-e^{-\dfrac{1}{2} x}

i.e. P(X

Printing time of Printer II is Uniform between 0 minutes and 5 minutes.

The cumulative distribution function  (CDF) for uniform distribution in interval (a,b) :-

F(x)=\dfrac{x-a}{b-a}

Then, P(X|B)=\dfrac{x-0}{5-0}=\dfrac{x}{5}

i.e. P(X

Now, the required probability :-

\text{P(A}|X

Hence, the required probability = 0.3042

3 0
4 years ago
____ grew out of work in the late ‘90s to make html comply with the rules of xml in order to facilitate the interoperation of we
Stolb23 [73]
The answer to this is XHTML
5 0
4 years ago
Janeen is concerned because the computer system did not upload the entries made the previous day.
BartSMP [9]
There are various possible reasons why the file that she is trying to upload is not uploading in her computer. FIrst maybe the internet connection is too slow or disconnected. Second, maybe the file is too big and lastly, the computer needs a restart 
4 0
4 years ago
Other questions:
  • A knowledge and skills test is a tool support managers use when selecting new employees; it measures an applicant's understandin
    13·1 answer
  • Which type of media would be best for showing global trade routes?
    7·2 answers
  • Because all web browsers don't interpret html and css the same way, a major web development issue is
    13·1 answer
  • Question 1 :The most common business firewall technique is to use a firewall server in conjunction with:This task contains the r
    11·1 answer
  • )What item is at the front of the list after these statements are executed?
    8·1 answer
  • the program is running, it can use the class to create as manyobjects of a specific type as needed. Each object that is created
    8·1 answer
  • Whats an effective way to sort linked lists in cpp.
    14·1 answer
  • Write a program to take in a time-of-day on the command-line as 3 integers representing hours, minutes, and seconds, along with
    13·1 answer
  • Hello everyone! can anybody help me? i need help with computing.
    10·1 answer
  • When developing an estimate, which of the following items is typically marked up with the highest percentage rate?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!