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
Here is a series of address references given as word addresses: 2, 3, 11, 16, 21, 13, 64, 48, 19, 11, 3, 22, 4, 27, 6, and 11. A
Allisa [31]

Answer:

Explanation:

kindly check the attachment for better explanation to the answer

4 0
3 years ago
. Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
r-ruslan [8.4K]

Answer:

Following are the code in c language

#include <stdio.h> // header file

long int factorial(int n); // declaration of factorial function

int main() // main function

{

   int n; // variable declaration

   printf("Enter a positive integer: ");

   scanf("%d", &n); // input number

   while(n<0) // checking the condition if number is negative

{

    printf("please enter a positive number:");

    scanf("%d", &n);

}

   printf("Factorial of %d = %ld", n, factorial(n)); // calling  factorial function

   return 0;

}

long int factorial(int n1) // recursive definition of factorial

{

   if (n1 >= 1)

       return n1*factorial(n1-1);

   else

       return 1;

}

Explanation:

In this program, it ask for a positive number input. if the value enter by user is negative then it again ask for positive input i.e positive number. Then it calls the recursive function of factorial. the recursive function factorial calculate the factorial recursively. suppose user input 4 then it goes to the if  part of program i.e return n*factorial(n-1); that means return 4*factorial(3) again recursive function call itself .this process repeated until it meets the base condition.  when a base condition meets, it return factorial of the given number.

output

Enter a positive integer: 5

factorial of 5=120

Enter a positive integer: -8

please enter a positive number:4

factorial of 4=24

4 0
3 years ago
Suppose you want to delete an existing file from within Word. What would you do? A. Click on the File button, choose Recent, ope
koban [17]
The asnwer would be A
7 0
3 years ago
How do you represent the decimal integer 50 in binary?
Colt1911 [192]
The answer is 110010 because the decimal number 50 can be expressed as 32 + 16 + 2.
3 0
3 years ago
You need to synchronize your mobile device data with your desktop computer. for security reasons, your organization prohibits sy
jeyben [28]

Answer:

USB

Explanation:

WHile trying to sync your mobile device data with your desktop computer, and Trying to avoid syncing your device over wireless connections or the internet, the best possible solution that comes to mind is to make use of USB.

Here you simply connect your phone to a USB cable and plug it to the USB port on your computer, you will be able to carry out the necessary syncing without violating the promotions from your organization concerning syncing devices over wireless connections or the internet.

8 0
3 years ago
Other questions:
  • How to save customised keyboard shortcuts on word
    11·1 answer
  • Write a function namedadd_complex that adds the correspondingnumbers of its arguments (both complexstructures), then returns the
    5·1 answer
  • How do i set up a RAID 1 array?​
    6·1 answer
  • Where do you go to create a workbook?​
    8·1 answer
  • How to change the date modified on a word document?
    11·1 answer
  • Which term describes the second core IPSec security protocol; it can perform authentication to provide integrity protection, alt
    13·1 answer
  • Which pair of features is relevant when buying a pc?
    9·2 answers
  • An ____ is a collection of tools, features, and interfaces that enables users to add, update, manage, access, and analyze the co
    10·1 answer
  • Which of the following are pointers?
    9·1 answer
  • In the 1760s and early 1770s, the British government wanted to raise money by taxing the residents of its colonies in North Amer
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!