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, 23.06.2019 04:40
The narrative structure of the popular movies can be broken down into
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Which of the statements below describe the guidelines for the use of text in presentation programs? a. do not use numbered lists. b. fonts should be appropriate for your audience. c. limit the number of fonts you use to three or four. d. only use bulleted lists for sales promotions. e. select font sizes that are appropriate for your delivery method. f. use font colors that work well with your background. select all that apply
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
How do i change the size of my bookmarks in my bookmarks bar in google chrome? ? plz hlp me
Answers: 2
You know the right answer?
Consider the following two transactions :

t1:

read(a);

read(b...
Questions
question
Biology, 10.11.2019 20:31
question
Mathematics, 10.11.2019 20:31
question
Mathematics, 10.11.2019 20:31
Questions on the website: 13722359