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]
3 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]3 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
I made a binary sentence if you answer you get 75 points heres the code: 01101001 01100110 00100000 01111001 01101111 01110101 0
butalik [34]

01001001 00100000 01100001 01100011 01110100 01110101 01100001 01101100 01101100 01111001 00100000 01110101 01110011 01100101 01100100 00100000 01100001 00100000 01000010 01101001 01101110 01100001 01110010 01111001 00100000 01100011 01101111 01100100 01100101 00100000 01000011 01101111 01101110 01110110 01100101 01110010 01110100 01100101 01110010 00100000 01101100 01101101 01100001 01101111

6 0
3 years ago
Read 2 more answers
Please answer no files !!
Pachacha [2.7K]

Answer:

im not exactly sure but i think its c

Explanation:

8 0
3 years ago
Hola, alguien me puede ayudar¡¡¡¡¡¡¡¡¡¡¡¡
WARRIOR [948]
Hola<span>, </span>Alguien me<span> podría </span>ayudar<span> a realizar una buena sinopsis de la película "</span><span>Jardín de Amapolas" dirigida por Carlos Melo Guevara, gracias? i hope i helped you</span>
4 0
3 years ago
What is a space flight that doesn’t complete a full orbit referred to as?
Vikentia [17]

Answer:

A flight that does not reach space is still sometimes called suborbital, but is not a 'suborbital spaceflight'. Usually a rocket is used, but experimental sub-orbital spaceflight has also been achieved with a space gun.

Explanation:

3 0
3 years ago
For the following code, if the input is negative, make numitemsPointer be null. Otherwise, make numitemsPointer point to numitem
weeeeeb [17]

Answer:

The program to this question can be described as follows:

Program:

#include <stdio.h> //defining header file  

int main() //defining main method

{

int* numItemsPointer; //defining pointer variable

int numItems; //defining integer variable

scanf ("%d", &numItems); //input value from user end

if(numItems < 0) //defining if block to check value

{

   numItemsPointer = NULL; //assign value to null

   printf ("Items is negative\n"); //print message

}

else //else block

{

   numItemsPointer = &numItems; //holds address

   numItems = numItems * 10; //multiple by 10

   printf("Items: %d\n", *numItemsPointer); //print value

}

return 0;

}

Output:

99

Items: 990

Explanation:

In the above program two integer variable "numItemsPointer and numItems" is defined, in which numItemsPointer is a pointer variable and numItems is integer variable, in which we input value from the user end, and an if condition statement is used, that check and calculate the values, which can be described as follows:

  • In the if block a condition is defined that variable "numItems" is less then 0, if this condition is true so, inside the block, it will assign a value, that is equal to "NULL", and prints its value.
  • If the condition is not true it will go to the else block, in this block, it will first pointer variable holds the variable address, and multiply the value by 10, and prints pointer variable value.
7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • True or false over the course of ecological succession,species diversity increases over time?
    12·2 answers
  • Which technology enables afloat forces to communicate more securely and to operate in a more dispersed manner?
    6·1 answer
  • The ____________ mechanism consists of a lever arm attached to the mousetrap spring.
    15·1 answer
  • The multitasking, multi-user, operating system developed by Bell Laboratories that operates on a wide variety of computing platf
    13·1 answer
  • HELP!!!
    11·2 answers
  • The Quick Search capability is found on which control?
    12·1 answer
  • HELP 100 points
    9·1 answer
  • Can I have some help?
    11·1 answer
  • Input a list of employee names and salaries and store them in parallel arrays. End the input with a sentinel value. The salaries
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!