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

Write a function, named "wait_die_scheduler" that takes a list of actions, and returns a list of actions according to the follow

ing rules. The actions given to the scheduler will only consist of WRITE and COMMIT actions. (Hence only exclusive locks need be implemented.) Each transaction will end with a COMMIT action. Before examining each action, attempt to perform an action for each of the transactions encountered (ordered by their names). After all the actions have been examined, continue to attempt to perform an action from each transaction until there are no more actions to be done. You will need to add LOCK, UNLOCK, and ROLLBACK actions to the list of actions to be returned, according to the Wait-Die protocol. If releasing more than one lock (for instance after a COMMIT), release them in order by the name of their object. Use the deferred transaction mode (only requesting locks when needed).

Computers and Technology
1 answer:
lidiya [134]3 years ago
4 0

Answer:

See attached picture for complete code.

Explanation:

See attached picture.

You might be interested in
What is an occupation?​
LiRa [457]

Answer:

a job or profession.

4 0
3 years ago
Which of the following scenarios might indicate that you have been a victim of identity theft?A)Your credit report displays acco
victus00 [196]

Answer:

Option A is the correct answer for the above question.

Explanation:

A Victim is a person, who faces the problem of a criminal person. Here in the question, the scenario is that a user is a victim of the identity of being theft by some other person. So the user can get known by the help of option a, which suggests that the user's credit card report display something which is not done by him then it can be the scenario, where the user can understand that he is a victim. hence option a is the correct answer where the other option is not because--

  • Option B suggests the user does not pay the bill on time but it is a general case because the bill is paid by the user is in every month not a single time.
  • Option C suggests both options (A and B) are correct, but option b is not the correct.
  • Option D suggests that no option is valid from the above but option A is the correct.
7 0
3 years ago
A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated.(1) Out
dimulka [17.4K]

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 int userNum;

 Scanner input = new Scanner(System.in);

 System.out.print("Enter integer: ");

 userNum = input.nextInt();

 System.out.println("You entered "+userNum);

 System.out.println(userNum+" squared is "+(userNum*userNum));

 System.out.println(userNum+" cubed is "+(userNum*userNum*userNum));

 int userNum2;

 System.out.print("Enter another integer: ");

 userNum2 = input.nextInt();

 int sum= userNum + userNum2; int product = userNum2 * userNum;

 System.out.println(userNum+" + "+userNum2+" = "+sum);

 System.out.println(userNum+" * "+userNum2+" = "+product); } }

Explanation:

This declares userNum

 int userNum;

 Scanner input = new Scanner(System.in);

This prompts the user for input

 System.out.print("Enter integer: ");

This gets user input from the user

 userNum = input.nextInt();

Number (1) is implemented here

 System.out.println("You entered "+userNum);

Number (2) is implemented here

 System.out.println(userNum+" squared is "+(userNum*userNum));

 System.out.println(userNum+" cubed is "+(userNum*userNum*userNum));

This declares another variable userNum2

 int userNum2;

This prompts the user for another input

 System.out.print("Enter another integer: ");

This gets user input from the user

 userNum2 = input.nextInt();

This calculates the sum and the product

 int sum= userNum + userNum2; int product = userNum2 * userNum;

Number (3) is implemented here

 System.out.println(userNum+" + "+userNum2+" = "+sum);

 System.out.println(userNum+" * "+userNum2+" = "+product);

8 0
2 years ago
let's imagine you're searching for hotels in searching chicago, what should you search for in order to get the most relevant res
n200080 [17]

Trivago, Trip advisor,

3 0
3 years ago
Select the levels of data backup.
navik [9.2K]
What levels r right and we can pick from??
6 0
3 years ago
Other questions:
  • You are reluctant to write an extra credit book report because you are afraid that your language and punctuation skills are not
    11·1 answer
  • Recording music using a keyboard controller is commonly accomplished using which type of audio file format?
    13·1 answer
  • Fill in the blank
    11·1 answer
  • 1. What is the main factor that affects Earth’s average temperature?
    12·1 answer
  • With modeling and simulation, we model the system and then test the ______________ to gather test predictions.
    7·1 answer
  • What is 14.10 to the tenth power​
    14·1 answer
  • To generate a series of first ten counting number of algorithm​
    9·1 answer
  • What year did polaroid introduce one-step photography with the SX-70
    14·1 answer
  • Which type of programming language translates one line of code at a time and then executes it before moving to the next line?
    5·2 answers
  • We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!