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
Write a program that prompts the user to input the decimal value of a double and outputs the number rounded to the nearest integ
KengaRu [80]

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

double n;

cout<<"Enter a decimal number: ";

cin>>n;

int Round= floor((n- floor(n))*2);

if(Round==0)

{

n= floor(n);

}

else n= ceil(n);

cout<<n;

return 0;

}

5 0
4 years ago
RBTs are likely to be the ABA professionals who are implementing skills acquisition plans. In order to prepare and plan for a se
arlik [135]

Answer:

review session notes from the previous session, and decide how to proceed with the current session

Explanation:

RBTs are registered behaviour technicians who could also function as Adaptive behavior assessment professionals. RBTs often help their clients increase their skill level. This is done through the application of the skill acquisition plan. The skill acquisition plan includes such things as the : skill deficit, goal to tackle deficit, data measurement systems etc. In order to have a successful session, RBTs should check and review session notes for previous exercise and from there plan how to proceed with new session.

7 0
3 years ago
which two statements about incoming and outgoing interfaces in firewall policies are true? (choose two.)
Ratling [72]

The statements that are true regarding incoming and outgoing interfaces in firewall policies are:

  • A zone can be chosen as the outgoing interface.
  • -Multiple interfaces can be selected as incoming and outgoing interfaces.

<h3>What is a firewall?</h3>

A firewall is a network security device used in computing that monitors and regulates incoming and outgoing network traffic in accordance with pre-established security rules. Typically, a firewall creates a wall between a trustworthy network and an unreliable network, like the Internet.

A firewall aids in defending your network from intruders. A firewall protects your network by operating as a continuous filter that constantly scans incoming data and blocks anything that appears to be suspicious.

Therefore, the statements that are true regarding incoming and outgoing interfaces in firewall policies are:

A zone can be chosen as the outgoing interface.

-Multiple interfaces can be selected as incoming and outgoing interfaces.

Learn more about firewall on:

brainly.com/question/13693641

#SPJ1

Which statements are true regarding incoming and outgoing interfaces in firewall policies? (Choose two.)

Select one or more:

-An incoming interface is mandatory in a firewall policy, but an outgoing interface is optional.

-A zone can be chosen as the outgoing interface.

-Only the any interface can be chosen as an incoming interface.

-Multiple interfaces can be selected as incoming and outgoing interfaces.

4 0
2 years ago
G The method of mapping where each memory locationis mapped to exactly one location in the cache is
Otrada [13]

Answer:

Direct Mapped Cache

Explanation:

Given that a Direct Mapped Cache is a form of mapping whereby each main memory address is mapped into precisely one cache block.

It is considered cheaper compared to the associative method of cache mapping, and it is faster when searching through it. This is because it utilizes a tag field only.

Hence, The method of mapping where each memory location is mapped to exactly one location in the cache is "Direct Mapped Cache"

4 0
3 years ago
A user states that when they power on their computer, they receive a "Non-bootable drive" error. The user works with external st
laila [671]

Answer:

B. Device boot order

Explanation:

The Device boot order makes a list of all the possible devices a system should check to in the operating system's boot files, as well as the proper sequence they should be in. Removable devices, hard drives, and flash drives are some devices that can be listed in the device boot order.

For the user whose computer displays a 'non-bootable drive' error, the device boot order would check all the devices listed to attempt booting from any of them. These devices might be in the order of removable discs, CD-ROM, hard drive. If all the options do not work, the computer would then do a Network boot. The order in which the devices are listed can be altered by the user.

8 0
4 years ago
Other questions:
  • In cell F29, use an IF function to display the correct Shipping Charge, based on the amount of the Discounted Total. If the Disc
    9·1 answer
  • write a 〕ava program to sort a random list of 10 numbers entered b y user in an array using Selection Sort technique
    5·1 answer
  • Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment v
    5·1 answer
  • Write a java program that declares an array "alpha" of 50 elements of type "double". Initialize the array so that the first 25 e
    11·1 answer
  • What’s the best description of an opportunity cost
    5·1 answer
  • Administrators who are wary of using the same tools that attackers use should remember that a tool that can help close an open o
    6·1 answer
  • Words that are restricted for use in object names because they belong to the SQL programming language are called _______________
    13·1 answer
  • Select the correct answer.
    10·1 answer
  • True or false<br>Y axis is also known as the value X.​
    9·2 answers
  • What is another term used for next generation firewalls
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!