Assume that at time 5 no system resources are being used except for the processor and memory. Now consider the following events:
At time 5: P1 executes a command to read from disk unit 3.
At time 15: P5’s time slice expires.
At time 18: P7 executes a command to write to disk unit 3.
At time 20: P3 executes a command to read from disk unit 2.
At time 24: P5 executes a command to write to disk unit 3.
At time 28: P5 is swapped out.
At time 33: An interrupt occurs from disk unit 2: P3’s read is complete.
At time 36: An interrupt occurs from disk unit 3: P1’s read is complete.
At time 38: P8 terminates.
At time 40: An interrupt occurs from disk unit 3: P5’s write is complete.
At time 44: P5 is swapped back in.
At time 48: An interrupt occurs from disk unit 3: P7’s write is complete.
For time 37, identify which state each process is in. If a process is blocked, further identify the event on which it is blocked.

Answers

Answer 1

Answer:

Follows are the solution to this question:

Explanation:

In Time = 22:

The P5 and P8 are in the ready/running state, and the P1, P3, P7 are into the block state for Input/output.

In Time = 37:

The P1, P3, P8 are in the ready/running state, P5 is in the block state. It suspends or swapped out, and P7 is on the block state for Input/output.  

In Time= 47:

The P1, P3, and P5 are in the ready/running state, P7 is on the block state for Input/output, and P8 is in the exit state.


Related Questions

Can someone tell me why this code in Java won't run?

if (s.toLowerCase().equals(s.toUpperCase()))
{
System.out.println("*");
}

Answers

Answer:

try typing the following:

String lc = s.toLowerCase();

String uc = s.toUpperCase();

if(lc == uc){

System.out.println("*")

}

Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Ex: If the input is 20.0 3.1599, the output is: 1.57995 7.89975 63.198 Note: Small expression differences can yield small floating-point output differences due to computer rounding. Ex: (a + b)/3.0 is the same as a/3.0 + b/3.0 but output may differ slightly. Because our system tests programs by comparing output, please obey the following when writing your expression for this problem. First use the dollars/gallon and miles/gallon values to calculate the dollars/mile. Then use the dollars/mile value to determine the cost per 10, 50, and 400 miles. Note: Real per-mile cost would also include maintenance and depreciation.

Answers

Answer:

The Following are the code to this question:

def cost(miles, milesPerGallon, dollarsPerGallon):##defining a method cost that accepts three parameter

   return miles / milesPerGallon * dollarsPerGallon# calculate cost and return it value  

milesPerGallon = float(input('Enter miles/Gallon value: '))#defining variable milesPerGallon for user input  

dollarsPerGallon = float(input('Enter dollars/ Gallon value: '))#defining variable dollarsPerGallon for user input

print('{:.5f}'.format(cost(10, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.5f}'.format(cost(50, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.3f}'.format(cost(400, milesPerGallon, dollarsPerGallon)))#call method and print its value

Output:

Enter miles/Gallon value: 20.0

Enter dollars/ Gallon value: 3.1599

1.57995

7.89975

63.198

Explanation:

In the above-given code, a method "cost" is defined, that accepts three value "miles, milesPerGallon, and dollarsPerGallon" in its parameter, and use the return keyword for calculating and return its value.

In the next step, two variable "milesPerGallon, and dollarsPerGallon" is declared, that use the input method with float keyword for input floating-point value.

After input value, it uses a print method with different miles values, which are "10,50, and 400", and input value to pass in cost method to call and print its return value.

Why are floppy disks obsolete ?

Answers

Answer:

they don't have enough space on them to carry useful information, and because most computers no longer have a drive for them. This is true for most legacy items

Adding a rock or stone looking characteristic to a background is which element of design?

Answers

Answer:

Explanation:

ejhdkl;xs

'

Choose the terms that best complete the sentence.

For users to be able to communicate with a large number of other people around the world, their
___needs to be connected to a_____
which has
an almost unlimited geographical distance.

Answers

WiFi needs to be connected to a router

Answer: For users to be able to communicate with a large number of other people around the world, their LAN needs to be connected to a WAN, which has an almost unlimited geographical distance.

Explanation: Correct on Edg 2020/2021.

The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0, which is no wind, up to 12, which is a hurricane. The following script first generates a random force value. Then, it prints a message regarding what type of wind that force represents, using a switch statement. You are to rewrite this switch statement as one nested 150 CHAPTER 4: Selection Statements if-else statement that accomplishes exactly the same thing. You may use else and/or elseif clauses.

ranforce = randi([0, 12]); switch ranforce case 0 disp('There is no wind') case {1,2,3,4,5,6} disp('There is a breeze') case {7,8,9} disp('This is a gale') case {10,11} disp('It is a storm') case 12 disp('Hello, Hurricane!') end

Answers

Answer:

ranforce = randi([0, 12]);

if (ranforce == 0)

     disp('There is no wind')

else  if(ranforce>0 && ranforce <7)

     disp('There is a breeze')

else  if(ranforce>6 && ranforce <10)

     disp('This is a gale')

else  if(ranforce>9 && ranforce <12)

     disp('It is a storm')

else  if(ranforce==12)

     disp('Hello, Hurricane!')

end

Explanation:

Replace all switch case statements with if and else if statements.

An instance is:

case {7,8,9}

is replaced with

else  if(ranforce>9 && ranforce <12)

All other disp statements remain unchanged

what are the steps to troubleshoot a frozen computer ​

Answers

You could hold the power button down 5-10 seconds.

The trigonometry book says: sin^2(t) + cos^2(t) = 1 Write a Python program that verifies the formula with the help of the Python Math module. Note that the trigonometric functions in the module act on the angles in radians. Your program should perform the following steps 3 times: 1. Pick a random number between 0 and 180 degrees representing an angle in degrees, say Dangle 2. Convert the angle from degrees to radians, say Rangle 3. Use the Math module to find and print the values of sin(Rangle) and cos(Rangle), and 4. Compute and print the value of the above expression: sin^2(Rangle) + cos^2(Rangle). You can then visually verify if the result printed is 1 (or close to it).

Answers

Answer:

If you open your python-3 console and execute the following .py code you will have the following output. (Inputing 20 e.g)

Write the angles in degrees: 20

radian angles is:  0.3490658503988659

cosene( 0.3490658503988659 ) =  0.9396926207859084

sine( 0.3490658503988659 ) =  0.3420201433256687

sin^2( 0.3490658503988659 ) + cos^2( 0.3490658503988659 ) =  1.0

Explanation:

Code

import math

for i in range(1,4):

   angle = int(input('Write the angles in degrees: '))

   #mat library better works with radians

   angle_radians = (angle*math.pi)/180

   #print output

   print('radian angles is: ',angle_radians)

   print('cosene(',angle_radians,') = ',math.cos(angle_radians))

   print('sine(',angle_radians,') = ',math.sin(angle_radians))

   res = (math.sin(angle_radians))**2 + (math.cos(angle_radians))**2

   print('sin^2(',angle_radians,') + cos^2(',angle_radians,') = ',res)

Assume a 64KB cache with four-word block size (a word is 4 bytes) and a 32-bit address. If a block has 28 tag bits, what is the type of this cache

Answers

Answer:

Fully associative

Explanation:

Fully associative cache is a type of cache in which after retrieving the data from memory, it subsequently allows data to be deposited in the available but unused cache block. This is to ensure that the storage of cache is done without forcing each memory address into one specific block.

Given the following

address = 32 bits,

tag = 28 bits, as a block is 4 words that are, 4x4 bytes,

offset = 4 bits, which equates to index = 0 bits.

Hence, it can be concluded that the type of cache is FULLY ASSOCIATIVE.

Other Questions
What were the advantages that the colonists had in the American Revolution over the British troops? What is the value of h(2) when h(x)=3x+1?Enter your answer in the box.h(2)= Which unit of measurement best matches the size of microorganisms BRUH PLS HELP I CANT GET ANY MORE WRONG Which of the following was NOT a problem facing the new nation?Diplomatic problems - The federal government was increasingly reliant on foreign loans to pay off its war debtsForeign threats - Britain refused to abandon its lost territory in North AmericaPolitical threats - There were very few trusted and intelligent leaders available to run the new nationEconomic problems - States were raising taxes and printing paper money which led to inflation why should farmers and workers build you a pyramid Describe the kinetic energy/ movement of the particles in plasma. BRUTUS. It must be by his death: and for my part I know no personal cause to spurn at him But for the general. He would be crowned: How that might change his nature, there's the question. The Tragedy of Julius Caesar, William Shakespeare What inference can be drawn about Brutus's motivation and his character? Brutus is ambitious for power of his own. Brutus acts without thinking things through. Brutus hates Caesar and is jealous of him. Brutus seeks to protect Rome from tyranny. Decide whether the underlined word below is a preposition, interjection or conjunction.The last customer left, so we closed the shop. Why did the U.S. declare war on Spain? Cycle Wholesaling sold merchandise on account, with terms n/60, to Sarahs Cycles on February 1 for $1,200 (cost of goods sold of $700). On February 9, Sarahs Cycles returned to Cycle Wholesaling one-quarter of the merchandise from February 1 (cost of goods returned was $190). Cycle Wholesaling uses a perpetual inventory system, and it allows returns only within 15 days of initial sale. Required: 1. to 3. Prepare the journal entry to record the sales, Goods returned on February 9 and Cash collected on March 2. 4. Calculate the gross profit percentage for the sale to Sarahs Cycles. How would natural cycles (day/night, moon phases) change if gravity did notexist? How do the following technologies help you on your quest to become a digital citizen What healthcare term does the sentence describe? ______ is a snapshot of a patient's health at a specific point in time. If a cell was to have it's plasma membrane freeze, why would the cell die? Pls answer(5x+7) (8x-7) solve for x For each term or name, write a sentence explaining its significance.Jesus -apostle -Paul -Diaspora -Constantine -bishop -Peter -pope - Name 5 Spanish explorers who daimed to have been in the continental United States in the 16th century. Prior to the beginning of World War I, European militarism became the policy of several nations. In 125 words or more, consider how militarism affects the art of diplomacy in solving disputes.Will give brainliest!! El __ trece anos. fill in the blank Determine the 50th term in the sequence defined by an = -11+ 5(n 1).