00:01
Hello student, here we have to consider the locking protocol.
00:04
So first, two -phase locking.
00:05
Two -phase locking, what is two -phase locking? one of the locking scheme in which a transaction cannot request a new lock until it unlocks the operation in the transaction.
00:14
It involves two phases, locking phase and unlocking phase.
00:16
Locking phase, this is the existing or the growing phase in which the new lock are required, but none is released.
00:24
Unblocking, this is the second phase referred to as the shrinking phase in which it releases the existing lock and doesn't require the new lock.
00:33
So this is about locking phase and unlocking phase.
00:36
Now we have to guarantee the serialization.
00:40
The traction of the two -phase algorithm delivers from a theorem which provides that the two -phase locking algorithm always reads to serialization schedule.
00:51
So our communication or the transaction take in the serial form.
00:55
It is proved that if every transaction is scheduled following the two -phase locking protocol then the schedule is guaranteed to be serialized.
01:04
We want serialization here because we want the guarantee.
01:08
Within the two -phase locking protocol, the schedule is guaranteed to be serialized because the protocol will prevent interphase among different transactions and it violates the protocol of the last update.
01:23
Uncommitted dependency and inconsistent analysis if the two -phase locking is enforced.
01:31
So this is the main thing.
01:32
Now consider i have taken the example, consider the given locking protocols.
01:37
Here i am taking locking protocols.
01:41
All the items are numbered because this is the requirement.
01:44
Once a data item is unlocked, items with a higher number can be locked.
01:49
Locks can be released at any time.
01:54
Only exclusive locks are used so that one by one communication takes place.
02:00
Consider the transactions.
02:04
Here i am taking two transactions t1 and t2 and valid schedule so that they can take place.
02:12
The number of the data item a is higher than that of the b.
02:15
A having the higher number.
02:17
This is assumed.
02:18
T1 and t2, here i have taken the two transactions.
02:22
Here first t1 having lock a.
02:26
After this t1 will write and after this t1 itself unlock...