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
Sedaia [141]
3 years ago
10

Assume that a finite number of resources of a single resource type must be managed. Processes may ask for a number of these reso

urces and —once finished—will return them. As an example, many commercial software packages provide a given number of licenses, indicating the number of applications that may run concurrently. When the applicationis started, the license count is decremented. When the application is terminated, the license count is incremented. If all licenses are in use, requests to start the application are denied. Such requests will only be granted when an existing license holder terminates the application and a license is returned.The following program segment is used to manage a finite number of instances of an available resource. The maximum number of resources and the number of available resources are declared as follows:#define MAX RESOURCES 5int available resources = MAX RESOURCES;When a process wishes to obtain a number of resources, it invokes the decrease_count() function:/* decrease available resources by count resources *//* return 0 if sufficient resources available, *//* otherwise return -1 */int decrease_count(int count) {if (available resources < count)return -1;else {available resources -= count;return 0;}}When a process wants to return a number of resources, it calls the increase_count() function:/* increase available resources by count */int increase_count(int count) {available resources += count;return 0;}The preceding program segment produces a race condition. Do the following:Identify the location and variables involved in the race condition and use a semaphore to fix the race condition.
Computers and Technology
1 answer:
nevsk [136]3 years ago
5 0
The answer may not be found
You might be interested in
On Study Island, What do I do when the numbers don't show up?
mafiozo [28]
Try restarting your laptop
8 0
3 years ago
Read 2 more answers
A detective agency is looking to bust an arms sale. According to available intelligence, the sale is likely to happen in one of
Paha777 [63]

Answer:

Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}

H(X)=5.4224 bits per symb

H(X|Y="not C")=0.54902 bits per symb

Explanation:

P(B)=2P(C)

P(A)=2P(B)

But

P(A)+P(B)+P(C)=1

4P(C)+2P(C)+P(C)=1

P(C)=1/7

Then

P(A)=4/7

P(B)=2/7

Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}

iii

If X={A,B,C}

and P(Xi)={4/7,2/7,1/7}

where  Id =logarithm to base  2

Entropy, H(X)=-{P(A) Id P(A) +P(B) Id P(B) + P(C) Id P(C)}

=-{(1/7)Id1/7 +(2/7)Id(2/7) +(4/7)Id(4/7)}

=5.4224 bits  per symb

if P(C)  =0

P(A)=2P(B)

P(B)=1/3

P(A)=2/3

H(X|Y="not C")= -(1/3)Id(I/3) -(2/3)Id(2/3)

=0.54902 bits per symb

4 0
3 years ago
Walking paths across the part is represented by the equation why equals -4x - 6​
Setler79 [48]

Answer:

I believe this is a graph question which would be impossible to do on brainly. Butttt, if so, -4x means you would go to the right 4, and the 6 means you would go up 6

Hope this helps:)

if you want to further explain question I'd be glad to help :))

5 0
3 years ago
In order to focus your presentation on people, you should
goldfiish [28.3K]
You should not be shy. be brave! #randompic

6 0
3 years ago
Read 2 more answers
Please Help! I will give a Brainliest to anyone who answers with the right answer! Please and Thank You! What view is most often
Nata [24]

Answer:

form is used ethier to display or enter data in access 2016

8 0
3 years ago
Other questions:
  • Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh
    13·1 answer
  • Write the percentage 5 1/4 as a decimal​
    8·1 answer
  • Write a JavaScript program to generate the following pattern but the number of rows should be user input.
    8·1 answer
  • Hiding data within pictures, audio, or video files can be difficult to detect and find. What can be done to reduce this?
    9·1 answer
  • An administrative assistant types a document, saves, and prints. The assistant is using _____.
    14·1 answer
  • 8. _______ are used to store all the data in a database.
    7·2 answers
  • Bullet points on a slide should be limited to _____.<br><br> A. 2<br> B. 4<br> C. 8<br> D. 10
    7·1 answer
  • Define application software​
    12·1 answer
  • Choose all items that are true about the two example of HTML shown on the right.
    5·2 answers
  • how is a two-dimensional array different from a traditional one dimensional array? From an ArrayList?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!