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
Algebraic concepts that include certain words and phrases and
Veseljchak [2.6K]

Answer:

Boolean Operators

Explanation:

When performing a boolean search, boolean operators allow users to combine keywords with operators (or modifiers) such as AND, NOT and OR to further produce more relevant results.

The boolean operators AND and OR are used to include certain words and phrases during the search while the  boolean operator NOT is used to exclude certain words and phrases.

6 0
3 years ago
How does computer applications affect our lives daily? 1- paragraph (4 sentences)
Mnenie [13.5K]

Answer:

Computers affect our lives daily because we use them everyday to browse the internet and solve problems in real life. They help solve problems and without them, getting certain information would be much harder. They help us interact with friends from anywhere in the world and communicate with relatives. It has also helped us during this pandemic and lets us learn from school in the safety of our own home.

( hope this helps, i wrote it myself ;-; )

4 0
3 years ago
Read 2 more answers
You can drag a cell to a new location by pointing to the cell border until the pointer displays a _______ arrow, and then draggi
Marina CMI [18]

The answer for the blank space given in the question is a type of arrow called four-headed arrow.

Four-headed arrow can be found in many computer software and applications, including in Microsoft Excel. Generally, <u>it is used to move an object from one place to another.</u> In the given scenario described at the question, it is used to move a cell from one location to another.

3 0
3 years ago
Read 2 more answers
What form of note taking would be MOST beneficial for a visual learner who needs to see the connections between ideas?
Svetlanka [38]

Answer:

Think link

Explanation:

8 0
3 years ago
can someone tell me what to do i’m kinda stuck and don’t know what he’s telling me to do pls ill give brainlist and points
Alexandra [31]

Answer:

Well a debtor is basically someone owing someone money, basically someone in debt. He’s telling cup head boy to take care of the people who owe him or someone else their or his money. Thats basically it.

8 0
2 years ago
Other questions:
  • What control features will you use in the input screens to aid in data entry? give a specific example of how you will use at lea
    6·1 answer
  • Why is charles babbage known as father of computer?​
    10·1 answer
  • Dynamic alliance networks work best in industries: a. that are mature and stable in nature. b. where the coordination of product
    9·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    9·1 answer
  • The primary function of application software is to apply the power of the computer to enable people, workgroups, and the entire
    7·1 answer
  • Cual es la importancia de aplicar los pasos en el modelo de diseño en las actividades académicas?
    14·1 answer
  • Where ....................... the books that you borrowed? *
    5·1 answer
  • A motor is controlled by a logic circuit. The circuit has inputs (0 or 1) from three sensors
    8·1 answer
  • The way a student prepares for a test or reviews academic material is referred to as
    8·2 answers
  • AYUDAAA ESPARA HOYYY
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!