Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Total marks: 1 0 Q . 2 Set. ( B ) i ) Consider a variant of the tree protocol called the forest protocol. The

Total marks: 10
Q.2Set. (B)
i) Consider a variant of the tree protocol called the forest protocol. The database is organized as a forest of rooted trees. Each transaction Ti must follow the following rules:
The first lock in each tree may be on any data item.
The second, and all subsequent, locks in a tree may be requested only if the parent of the requested node is currently locked.
Data items may be unlocked at any time.
A data item may not be relocked by Ti after it has been unlocked by Ti .
Show that the forest protocol does not ensure serializability. (6 marks)
ii)
Consider the following two transactions:
T34: read(A);
read(B);
if A =0 then B := B +1;
write(B).
T35: read(B);
read(A);
if B =0 then A := A +1;
write(A).
a. Add lock and unlock instructions to transactions T31 and T32, so that they observe the two-phase locking protocol. (2 marks)
b. Can the execution of these transactions result in a deadlock? (2 marks)
Total marks:10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Describe the various types of research designs.

Answered: 1 week ago