subject
Computers and Technology, 27.11.2019 05:31 demij

Consider the following two transactions :

t1:

read(a);

read(b);

if a = 0 then b : = b + 1;

write(b).

t2:

read(b);

read(a);

if b = 0 then a : = a + 1;

write(a).

a- add lock and unlock instructions to transactions t1 and t2, so that they observe the two-phase locking protocol.

use the lock-s and lock-x notation as defined below:

-shared lock.

if a transaction t has obtained a shared-mode lock (denotedby lock-s) on item q, thent can read, but cannot write, q. 2.

-exclusive lock.

if a transaction t has obtained an exclusive-mode lock (denoted by lock-x) on item q, thent can both read and write q.

b- can the execution of these transactions result in a deadlock? give an example if it can. write all the details.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:20
Write a program called assignment3 (saved in a file assignment3.java) that computes the greatest common divisor of two given integers. one of the oldest numerical algorithms was described by the greek mathematician, euclid, in 300 b.c. it is a simple but very e↵ective algorithm that computes the greatest common divisor of two given integers. for instance, given integers 24 and 18, the greatest common divisor is 6, because 6 is the largest integer that divides evenly into both 24 and 18. we will denote the greatest common divisor of x and y as gcd(x, y). the algorithm is based on the clever idea that the gcd(x, y) = gcd(x ! y, y) if x > = y and gcd(x, y) = gcd(x, y ! x) if x < y. the algorithm consists of a series of steps (loop iterations) where the “larger” integer is replaced by the di↵erence of the larger and smaller integer. this continues until the two values are equal. that is then the gcd.
Answers: 3
question
Computers and Technology, 22.06.2019 09:40
In the lab, which of the following displayed a list of all installed services and included a description of the service, the current state, and whether the service started automatically or manually? a. the services manager b. the applications summary c. the recommended services d. list the safe services list
Answers: 2
question
Computers and Technology, 22.06.2019 14:30
Create a pseudocode design to prompt a student for their student id and the titles of the three classes they want to add. the solution should display the student’s id and a total bill. • bill a student using the following rules: o students can only add up to 3 classes at a time.
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
You know the right answer?
Consider the following two transactions :

t1:

read(a);

read(b...
Questions
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
question
Mathematics, 16.09.2020 05:01
Questions on the website: 13722363