0

I have gone through a few of sources but recently came across one that says even shared read locks isn't allowed in strict 2PL. Is this true? Also please confirm that Sharing is allowed with Conservative and Basic 2PL?

Cornelis
  • 1,065
  • 8
  • 23

1 Answers1

3

The Lock-Compatiability matrix answers your question

Lock-Type       Read-Lock        write-Lock
Read-Lock                            X
Write-Lock         X                 X

Here X denotes that the two types of lock are incompatiable and blank denotes that lock are compatiable.Shared lock(read lock) is allowed only if shared lock is held on that item.

Regarding strict and rigorous 2PL the difference come only in the order in which the lock are released when compared with basic 2PL.

In strict 2PL all write locks are released only after commit/abort opeartion.

In rigorous 2PL all locks are released only after commit/abort opeartion.

akashchandrakar
  • 2,009
  • 3
  • 23
  • 47