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
algol [13]
3 years ago
9

Part 3: Please answer

Computers and Technology
1 answer:
Levart [38]3 years ago
3 0

Answer:

a) 4 processes

b) 2 resources

c) R1: 2 instances

   R2: 2 instances

d) R2

e) R1

f) R1

g) No resource

h)  R1

i) R2

j) R2

k) No

l)No deadlock

Explanation:

You need to know that the resources that are required by the processes for completion are shown by the request edge and the resources allocated are shown by the allocation edge. And thus, we can find what resources are allocated to the process, and required for the completion accordingly. And here again, the cycle is created, and hence deadlock may or may not occur. However, we see that resources have multiple instances and get freed on time. And hence, deadlock does not occur.

Like,

P4 uses R2 and free one instance of R2.

P3 then uses one instance of R2 and free R2.

P3 then uses one instance of R3 and free R3.

P1 uses one instance of R1 and free R1 one instance

P1 then uses R2 and free R2.

P2 uses R1 and free R1.

Hence, all the processes are complete and deadlock does not occur.

You might be interested in
Write the definition of a method dashedLine, with one parameter, an int. If the parameter is negative or zero, the method does n
ZanzabumX [31]

Answer:

import java.util.Scanner;

public class DashLine {

public static void main(String[] args) {

// Declaring variables

int n;

/*

* Creating an Scanner class object which is used to get the inputs

* entered by the user

*/

Scanner sc = new Scanner(System.in);

// Getting the input entered by the user

System.out.print("Enter a number :");

n = sc.nextInt();

// calling the method by passing the user entered input as argument

dashedLine(n);

}

//This method will print the dashed line for number greater than zer

private static void dashedLine(int n) {

if (n > 0) {

for (int i = 1; i <= n; i++) {

System.out.print("-");

}

System.out.println();

}

}

}

Explanation:

5 0
3 years ago
g Create your own data file consisting of integer, double or String values. Create your own unique Java application to read all
Jlenok [28]

Answer:

See explaination

Explanation:

//ReadFile.java

import java.io.File;

import java.io.FileNotFoundException;

import java.util.Scanner;

public class ReadFile

{

public static void main(String[] args)

{

int elementsCount=0;

//Create a File class object

File file=null;

Scanner fileScanner=null;

String fileName="sample.txt";

try

{

//Create an instance of File class

file=new File(fileName);

//create a scanner class object

fileScanner=new Scanner(file);

//read file elements until end of file

while (fileScanner.hasNext())

{

double value=fileScanner.nextInt();

elementsCount++;

}

//print smallest value

System.out.println(elementsCount+" data values are read");

}

//Catch the exception if file not found

catch (FileNotFoundException e)

{

System.out.println("File Not Found");

}

}

}

Sample output:

sample.txt

10

20

30

40

50

output:

5 data values are read

5 0
3 years ago
How can people efficiently and effectively influence lots of people throughout the world
tatuchka [14]

Answer:

The word efficient denotes the ability to achieve a good goal toward a person, and effectiveness denotes reliable production or achievement.

Explanation:

Many people around the world can set efficient goals, that is, to influence or encourage other people to make good projects or changes in their lives, by example or simply teach them with patience and altruism.

In this way effectiveness will be seen, that is, the product or the achievement precisely when we observe how people undertake new projects in their lives

3 0
3 years ago
Two technicians are discussing engine valve timing. Technician A says that the optimum valve timing is found through experimenta
nordsb [41]
The answer is B. A only. The optimum valve timing is found through experimentation using an engine dynamometer. The timing of the opening and closing of the valves is called valve timing. So the use of dynamometer measures the power output of a machine that is why it can measure the optimum valve timing.
7 0
3 years ago
Read 2 more answers
If user reading a document on computer, it allows you to navigate on any part of the document called?
VashaNatasha [74]
I Think Its either  B or C
6 0
3 years ago
Other questions:
  • If you wanted to create a graph that showed how much each value contributed to the whole value, you would use a _____.
    15·2 answers
  • Word processing programs have different view options that you can use depending on the tasks your performing
    5·1 answer
  • When he takes a picture, Simon freezes an action without blurring it, to show movement. Which type of photographer is he?
    9·2 answers
  • Free 100 point to first to answer
    5·2 answers
  • Two technicians are discussing shielded cable. Technician A says that shielded wires are generally twisted in pairs to cancel th
    14·1 answer
  • If you wish to maintain a consistent style to all the documents you create, it would be helpful to use a _​
    5·1 answer
  • For a parking payment app, what option would MOST likely connect a user to a third party/external gateway?
    10·1 answer
  • I NEED HELP QUICK
    9·1 answer
  • Which type of address is the ip address 232. 111. 255. 250?.
    11·1 answer
  • Retype the below code. Fix the indentation as necessary to make the program work.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!