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
Tom [10]
2 years ago
13

Consider a system consisting of m resources of the same type, being shared by n processes. Resources can be requested and releas

ed by processes only one at a time. Show that the system is deadlock free if the following two conditions hold:
A. The maximum need of each process is between 1 and m resources
B. The sum of all maximum needs is less than m+n.
Computers and Technology
1 answer:
Aloiza [94]2 years ago
3 0

Answer:

A=Sum of all needs

B=Sum of all allocations

C=Sum of all max need

Let's say that our system is not deadlock free right now. If the system is in deadlock then sum of all allocations should be equal to the total number of resources i.e. B = m

Now the statement (b) says that sum of all maximum needs is less than m+ n i.e. A + B = C < m + n.

As from above deduction B = m so, A + m < m + n

or A < n, which means that there is one process for which need it zero as number of processes it greater than need and a process can request and release only one resource at a time. So, there are n-1 processes sharing m resources currently. But no process will wait permanently, hence there is a contradiction and there is no deadlock.

You might be interested in
What will be the output of the following code? &lt;?php $foo = 'Bob'; $bar = $foo; $bar = "My name is $bar"; print $bar; print $
SCORPION-xisa [38]

Answer: b. My name is BobBob

Explanation:

  • $foo = 'Bob'; // Assigns foo variable the value Bob
  • $bar = $foo; // Assigns the value of foo to bar
  • $bar = "My name is $bar"; //changes the $bar this is the way to  include variables directly in the string.
  • print $bar; // this prints My name is and moves to the variable $bar which prints the value of $bar which is the value of $foo i.e. Bob
  • print $foo; // prints another Bob
7 0
3 years ago
Read 2 more answers
Why might you use the "search network campaigns with display opt-in" campaign type?
slava [35]
The answer is:
You can use one budget to advertise on the Search Network and Display Network
5 0
2 years ago
Read 2 more answers
A program is considered portable if it . . . can be rewritten in a different programming language without losing its meaning. ca
Semenov [28]

Answer:

Can be executed on multiple platforms.

Explanation:

A program is portable if it is not platform dependent. In other words, if the program is not tightly coupled to a particular platform, then it is said to be portable. Portable programs can run on multiple platforms without having to do much work. By platform, we essentially mean the operating system and hardware configuration of the machine's CPU.

Examples of portable programs are those written in;

i. Java

ii. C++

iii. C

8 0
3 years ago
Given four inputs: a, b, c &amp; d, where (a, b) represents a 2-bit unsigned binary number X; and (c, d) represents a 2-bit unsi
Amiraneli [1.4K]

Answer:

z = a.c' + a.b.d' + b.c'.d'

Explanation:

The truth table for this question is provided in the attachment to this question.

N.B - a' = not a!

The rows with output of 1 come from the following relations: 01 > 00, 10 > 00, 10 > 01, 11 > 00, 11 > 01, 11 > 10

This means that the Boolean expression is a sum of all the rows with output of 1.

z = a'bc'd' + ab'c'd' + ab'c'd + abc'd' + abc'd + abcd'

On simplification,

z = bc'd' + ab'c' + ac'd' + ac'd + abc' + abd'

z = ac' + abd' + bc'd'

Hope this helps!

6 0
3 years ago
Consider the code fragment below (with nested loops). int sum = 0;for (int i = 1; i &lt; 5; i++) for (int j = 1; j &lt;= i; j++)
sammy [17]

Answer:

Option d is the correct answer for the above question.

Explanation:

  • The first loop of the program has a second loop and then the statement. In this scenario, the second loop executes for the value of the first loop and the statement executes for the value of the second loop.
  • The first loop executes 4 times, Then the second loop or inner loop executes n times for the n iteration of the first loop, for example, 1 time for the first iteration of the first loop, 2 times for the second iteration of the first loop and so on.
  • Then the inner loop executes (1+2+3+4) iteration which gives the result 10 iterations.
  • The sum initial value is 0 and the "sum++", increase the value of the sum by 1.
  • So the value of the sum becomes 10 after completing 10 iterations of the inner for loop.
  • Hence the 10 will be the output. So the Option d is the correct answer while the other is not.
3 0
3 years ago
Other questions:
  • Write a program that estimates the approximate number of times the user’s heart has beat in his/her lifetime using an average he
    12·1 answer
  • To keep a desktop computer or a server powered up when the electricity goes off in addition to protection against power fluctuat
    8·2 answers
  • Which is a benefit of peer-to-peer networking?
    10·1 answer
  • Your friend sees an error message during Windows startup about a corrupted bootmgr file. He has another computer with a matching
    12·1 answer
  • How does a layered pattern make use of abstraction and encapsulation?
    10·1 answer
  • Given the following sets, for each set operation provide the elements of the resulting set in set notation or using a well-known
    5·1 answer
  • true or false You are able to change the formatting of a table after it is inserted into a placeholder.
    6·1 answer
  • A network of computers that provides access to information on the web.
    15·2 answers
  • Why is it useful to understand coding fundamentals even if you work in a game design role that doesn’t traditionally write code?
    9·1 answer
  • A technique that was developed to determine whether a machine could or could not demonstrate the artificial intelligence known a
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!