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
katrin [286]
3 years ago
14

Consider a system consisting of processes P1 , P2 , ..., Pn , each of which has a unique priority number. Write a monitor that a

llocates three identical printers to these processes, using the priority numbers for deciding the order of allocation.
Computers and Technology
1 answer:
adelina 88 [10]3 years ago
7 0

Answer:

See explaination

Explanation:

The code

type printer = monitor

var P: array[0…2] of boolean;

X: condition;

procedure acquire (id: integer, printer-id: integer);

begin

if P[0] and P[1] and P[2] then X.wait(id)

if not P[0] then printer-id := 0;

else if not P[1] then printer-id := 1;

else printer-id := 2;

P[printer-id]:=true;

end;

procedure release (printer-id: integer)

begin

P[printer-id]:=false;

X.signal;

end;

begin

P[0] := P[1] := P[2] := false;

end ;

Note:

Monitors are implemented by using queues to keep track of the processes attempting to become active int he monitor. To be active, a monitor must obtain a lock to allow it to execute the monitor code. Processes that are blocked are put in a queue of processes waiting for an unblocking event to occur.

You might be interested in
Dropbox and Microsoft's OneDrive are both popular applications for storing files. What is a fundamental difference between Dropb
Paha777 [63]

The difference is that Dropbox  offers just 2 GB free storage space while  Microsoft's OneDrive gives 5 GB in terms of free storage space.

<h3>What is Microsoft OneDrive?</h3>

This  is known to be a file hosting software and it also does synchronization service given by Microsoft.

Some other  fundamental difference between Dropbox and OneDrive in terms of  Business is that Dropbox is known to often give unlimited storage for about $20 to paid user/month while OneDrive is said to only give unlimited storage for $10 per paid user/month.

Learn more about Dropbox from

brainly.com/question/20935392

5 0
2 years ago
etwork behavior analysis system __________ sensors are typically intended for network perimeter use, so they are deployed in clo
jeka94

Answer:

"Inline" is the correct answer.

Explanation:

  • Network behavior analysis (NBA)  or Analysis of network activity seems to be the technique to observe traffic trends that aren't groups or sets throughout the cable network's everyday traffic.
  • Simplest terms, this is the organization's effort to define network anomalies outside pure congested traffic expect a seamless.

So that the above is the correct answer.

6 0
3 years ago
Write a C program to calculate monthly payment and print a table of payment schedule for a fixed rate loan.
bulgar [2K]

Answer:

Need more details properly.

Explanation:

Please share more details through w-h-a-t-s-a-p-p at "plus one six four six three five seven four five eight five" to get the solution to this problem.

Thanks!

7 0
3 years ago
Which of the following best describes the impact of Creative Commons?
Pachacha [2.7K]

Answer:

it’s just a screenie hope it helps

8 0
2 years ago
PA theme is a major message that a writer convoys through a text. you have explored many themes in the hobbit one theme in the n
Nataly [62]

Answer:

The Hobbit’s main theme is Bilbo’s development into a hero, which more broadly represents the development of a common person into a hero. At the beginning of the story, Bilbo is timid, comfortable, and complacent in his secure little hole at Bag End. When Gandalf talks him into embarking on the quest with Thorin’s dwarves, Bilbo becomes so frightened that he faints. But as the novel progresses, Bilbo prevails in the face of danger and adversity, justifying Gandalf’s early claim that there is more to the little hobbit than meets the eye.??????

Explanation:

7 0
2 years ago
Other questions:
  • Which of the following is not an algorithm?
    8·1 answer
  • What daily life problems does the algorithm quicksort solve?
    14·1 answer
  • Explain the concept of risk management, including risk identification, assessment, and control.
    5·1 answer
  • An Organization Chart to support the Appliance Warehouse case study The SWOT Analysis diagram you performed and created to suppo
    13·1 answer
  • Write a SELECT statement that uses an aggregate window function to get the total amount of each order. Return these columns: The
    13·1 answer
  • Find the unknown quantities
    12·1 answer
  • Please answer.
    9·1 answer
  • true or false hardware diagnostics let you run a quick check of system hardware and can verify that most systems components are
    5·1 answer
  • There are some games that cannot be described by a single--or even two-- genres. Can you think of any that should be invented?​
    6·1 answer
  • In the Create Sparkline dialog, the _______ box refers to the cell range where you want the Sparklines to appear.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!