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
UNO [17]
3 years ago
11

What is the available vector for each resource and the need matrix for each thread. Note that an available vector depicts the qu

antities of resources of each type that are available in the system after current allocation. The need matrix depicts of the quantities of resources of each type still needed by each thread, with each column corresponding to a thread and each row corresponding to a resource and an entry in location [i, j] of the matrix showing the quantity of a resource rj still needed by a thread ti.

Computers and Technology
1 answer:
blsea [12.9K]3 years ago
4 0

Answer:

If request granted then T₁ and T₂ are in deadlock.

Explanation:

See attached image

You might be interested in
Python uses standard order of operations to evaluate equations. True False
Strike441 [17]

Answer:

False... Can you give me brainliest

Explanation:

6 0
3 years ago
A _____ is a collection of binary digits, including message data and control characters for formatting and transmitting, sent fr
Keith_Richards [23]

Answer:

Packet

Explanation:

8 0
3 years ago
A condition-controlled loop uses a while loop.<br><br> true<br><br> false
matrenka [14]

Answer:

true

Explanation:

a while loop is a condition-controlled loop. While loops continue no matter what under a certain condition, unless you insert the keyword <em>break.</em>

One example in python is this:

while x > y:

      <em>pass</em>

The keyword to break a while loop may vary depending on the coding language you are using.

<u>Tip</u> The pass keyword allows a no error contact between loop and the terminal. Pass in a nutshell is almost as if saying nothing at all, but just leaving the condition blank. We only use pass because it prevents errors instead of no value.

8 0
2 years ago
Create an array of doubles to contain 5 values Prompt the user to enter 5 values that will be stored in the array. These values
Gre4nikov [31]

Solution :

$\#$include $$  

$\#$include $$    

void parse$\_$name($char \ full[]$, char first$[],$ char last$[])$

{

// to_get_this_function_working_immediately, _irst

// stub_it_out_as_below._When_you_have_everything_else

// working,_come_back_and_really_parse_full_name

// this always sets first name to "Noah"

int i, j = 0;

for(i = 0; full[i] != ' '; i++)

  first[j++] = full[i];

first[j] = '\0';  

// this always sets last name to "Zark"

j = 0;

strcpy(last, full+i+1);

// replace the above calls with the actual logic to separate

// full into two distinct pieces

}

int main()

{

char full[40], first[20], last[20];

double hours[5];

// ask the user to enter full name

printf("What is your name? ");

gets(full);

// parse the full name into first and last

parse_name(full, first, last);

// load the hours

for(int i = 0; i < 5; i++)

{

   printf("Enter hours for day %d: ", i+1);

   scanf("%lf", &hours[i]);

}

// create the time card

FILE* fp = fopen("timecard.txt", "w");

fprintf(fp, "First Name: %s\n", first);

fprintf(fp, "Last Name: %s\n", last);

double sum = 0.0;

for(int i = 0; i < 5; i++)

{

   fprintf(fp, "Day %i: %.1lf\n", i+1, hours[i]);

   sum += hours[i];

}

fprintf(fp, "Total: %.1f\n", sum);    

printf("Timecard is ready. See timecard.txt\n");

return 0;

}

3 0
3 years ago
From the binary search algorithm, it follows that every iteration of the while loop cuts the size of the search list by half.
Colt1911 [192]

Answer:

True: In binary search algorithm, we follow the below steps sequentially:

Input: A sorted array  B[1,2,...n] of n items and one item x to be searched.

Output: The index of x in B if exists in B, 0 otherwise.

  1. low=1
  2. high=n
  3. while( low < high )
  4.  {      mid=low + (high-low)/2
  5.         if( B[mid]==x)
  6.          {
  7.             return(mid)  //returns mid as the index of x
  8.           }
  9.          else
  10.          {
  11.              if( B[mid] < x)      //takes only right half of the array
  12.               {
  13.                 low=mid+1
  14.               }
  15.              else               // takes only the left half of the array
  16.               {
  17.                high=mid-1
  18.               }
  19.           }
  20.  }
  21. return( 0 )

Explanation:

For each iteration the line number 11 or line number 15 will be executed.

Both lines, cut the array size to half of it and takes as the input for next iteration.

6 0
4 years ago
Other questions:
  • What are the desirable qualities of a Product Vision?
    11·1 answer
  • Where are all of your documents saved?
    14·2 answers
  • In the retrieval phase of Godden and Baddeley (1975) study of the encoding specificity principle, participants were asked to sup
    9·1 answer
  • What is the difference between a sequential program and an event-driven program?
    9·1 answer
  • Susan's monthly goal to open five new customer
    10·1 answer
  • Name three output devices
    6·1 answer
  • What type of computer system can be found in the computer lab at school?
    14·1 answer
  • What is the last usable host IP address on the 192.168.32.9/30 network?
    15·1 answer
  • WILL GIVE BRAINLIEST!!!!
    14·2 answers
  • A(n) _____________ changes the order in which instructions are carried out by directing the computer to execute a statement else
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!